+2006-12-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): New fun.
+
2006-12-11 Juanma Barranquero <lekktu@gmail.com>
* subr.el (unread-command-char): Reformat obsolescence info.
(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)
(cond
((nth 3 ppss) 'string)