Document syntax-ppss-context

* doc/lispref/syntax.texi (Parser State): Document it.

* lisp/emacs-lisp/syntax.el (syntax-ppss-context): Add a doc
string (bug#32504).
This commit is contained in:
Lars Ingebrigtsen 2019-06-24 00:04:04 +02:00
parent 63b29f8107
commit f3b1b5fb50
2 changed files with 9 additions and 0 deletions

View file

@ -371,6 +371,10 @@ itself at the outermost level), return nil."
(nth 8 ppss)))
(defsubst syntax-ppss-context (ppss)
"Say whether PPSS is a string, a comment, or something else.
If PPSS is a string, the symbol `string' is returned. If it's a
comment, the symbol `comment' is returned. If it's something
else, nil is returned."
(cond
((nth 3 ppss) 'string)
((nth 4 ppss) 'comment)