# HG changeset patch # User Stefan Monnier # Date 1166450550 0 # Node ID 80f7458bbb20b3c05e52c14c5c7433af5a1619fc # Parent c6c8c744f694461c79ef14a85800108c3a926dc1 (syntax-ppss-toplevel-pos): Improve docstring. diff -r c6c8c744f694 -r 80f7458bbb20 lisp/emacs-lisp/syntax.el --- a/lisp/emacs-lisp/syntax.el Mon Dec 18 11:53:08 2006 +0000 +++ b/lisp/emacs-lisp/syntax.el Mon Dec 18 14:02:30 2006 +0000 @@ -53,10 +53,12 @@ (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." + "Get the latest syntactically outermost position found in a syntactic scan. +PPSS is a scan state, as returned by `partial-parse-sexp' or `syntax-ppss'. +An \"outermost position\" means one that it is outside of any syntactic entity: +outside of any parentheses, comments, or strings encountered in the scan. +If no such position is recorded in PPSS (because the end of the scan was +itself at the outermost level), return nil." (or (car (nth 9 ppss)) (nth 8 ppss)))