aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/syntax.texi33
1 files changed, 19 insertions, 14 deletions
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index d5a7eba13fe..f81c1643c21 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -791,10 +791,10 @@ Hooks}).
791@subsection Parser State 791@subsection Parser State
792@cindex parser state 792@cindex parser state
793 793
794 A @dfn{parser state} is a list of ten elements describing the state 794 A @dfn{parser state} is a list of (currently) eleven elements
795of the syntactic parser, after it parses the text between a specified 795describing the state of the syntactic parser, after it parses the text
796starting point and a specified end point in the buffer. Parsing 796between a specified starting point and a specified end point in the
797functions such as @code{syntax-ppss} 797buffer. Parsing functions such as @code{syntax-ppss}
798@ifnottex 798@ifnottex
799(@pxref{Position Parse}) 799(@pxref{Position Parse})
800@end ifnottex 800@end ifnottex
@@ -851,15 +851,20 @@ position where the string began. When outside of strings and comments,
851this element is @code{nil}. 851this element is @code{nil}.
852 852
853@item 853@item
854Internal data for continuing the parsing. The meaning of this 854The list of the positions of the currently open parentheses, starting
855data is subject to change; it is used if you pass this list 855with the outermost.
856as the @var{state} argument to another call. 856
857@item
858When the last buffer position scanned was the (potential) first
859character of a two character construct (comment delimiter or
860escaped/char-quoted character pair), the @var{syntax-code}
861(@pxref{Syntax Table Internals}) of that position. Otherwise
862@code{nil}.
857@end enumerate 863@end enumerate
858 864
859 Elements 1, 2, and 6 are ignored in a state which you pass as an 865 Elements 1, 2, and 6 are ignored in a state which you pass as an
860argument to continue parsing, and elements 8 and 9 are used only in 866argument to continue parsing. Elements 9 and 10 are mainly used
861trivial cases. Those elements are mainly used internally by the 867internally by the parser code.
862parser code.
863 868
864 One additional piece of useful information is available from a 869 One additional piece of useful information is available from a
865parser state using this function: 870parser state using this function:
@@ -898,11 +903,11 @@ The depth starts at 0, or at whatever is given in @var{state}.
898 903
899If the fourth argument @var{stop-before} is non-@code{nil}, parsing 904If the fourth argument @var{stop-before} is non-@code{nil}, parsing
900stops when it comes to any character that starts a sexp. If 905stops when it comes to any character that starts a sexp. If
901@var{stop-comment} is non-@code{nil}, parsing stops when it comes to the 906@var{stop-comment} is non-@code{nil}, parsing stops after the start of
902start of an unnested comment. If @var{stop-comment} is the symbol 907an unnested comment. If @var{stop-comment} is the symbol
903@code{syntax-table}, parsing stops after the start of an unnested 908@code{syntax-table}, parsing stops after the start of an unnested
904comment or a string, or the end of an unnested comment or a string, 909comment or a string, or after the end of an unnested comment or a
905whichever comes first. 910string, whichever comes first.
906 911
907If @var{state} is @code{nil}, @var{start} is assumed to be at the top 912If @var{state} is @code{nil}, @var{start} is assumed to be at the top
908level of parenthesis structure, such as the beginning of a function 913level of parenthesis structure, such as the beginning of a function