Commit 0e6c966c authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(syntax-ppss-toplevel-pos): New fun.

parent 53d45a17
2006-12-12 Stefan Monnier <>
* emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): New fun.
2006-12-11 Juanma Barranquero <>
* subr.el (unread-command-char): Reformat obsolescence info.
......@@ -52,6 +52,14 @@
(defsubst syntax-ppss-depth (ppss)
(nth 0 ppss))
(defun syntax-ppss-toplevel-pos (ppss)
"Return the last preceding position at toplevel.
\"At toplevel\" means that it is outside of any syntactic entity:
outside of any parentheses, or comments, or strings.
Returns nil iff PPSS itself corresponds to a toplevel position."
(or (car (nth 9 ppss))
(nth 8 ppss)))
(defsubst syntax-ppss-context (ppss)
((nth 3 ppss) 'string)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment