summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/syntax.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-24 00:04:04 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-24 00:04:04 +0200
commitf3b1b5fb5034de026adc41cf2403cff42f4a0b67 (patch)
treeea7aa8eb6950022370e1712ae54c177527868002 /lisp/emacs-lisp/syntax.el
parent63b29f81075a3fdca70348f023d3ebb37a4f2a63 (diff)
downloademacs-f3b1b5fb5034de026adc41cf2403cff42f4a0b67.tar.gz
emacs-f3b1b5fb5034de026adc41cf2403cff42f4a0b67.tar.bz2
emacs-f3b1b5fb5034de026adc41cf2403cff42f4a0b67.zip
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).
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
-rw-r--r--lisp/emacs-lisp/syntax.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 60ed531e63d..6464e2a52db 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -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)