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:
parent
63b29f8107
commit
f3b1b5fb50
2 changed files with 9 additions and 0 deletions
|
@ -882,6 +882,11 @@ The value is @code{nil} if @var{state} represents a parse which has
|
|||
arrived at a top level position.
|
||||
@end defun
|
||||
|
||||
@defun syntax-ppss-context state
|
||||
Return @code{string} if @var{state} is a string and @code{comment} if
|
||||
it's a comment.
|
||||
@end defun
|
||||
|
||||
@node Low-Level Parsing
|
||||
@subsection Low-Level Parsing
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue