Function: syntax-ppss-toplevel-pos

syntax-ppss-toplevel-pos is a byte-compiled function defined in syntax.el.gz.

Signature

(syntax-ppss-toplevel-pos PPSS)

Documentation

Get the latest syntactically outermost position found in a syntactic scan.

PPSS is a scan state, as returned by parse-partial-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.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/syntax.el.gz
(defun syntax-ppss-toplevel-pos (ppss)
  "Get the latest syntactically outermost position found in a syntactic scan.
PPSS is a scan state, as returned by `parse-partial-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)))