diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/syntax.texi | 33 |
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 |
| 795 | of the syntactic parser, after it parses the text between a specified | 795 | describing the state of the syntactic parser, after it parses the text |
| 796 | starting point and a specified end point in the buffer. Parsing | 796 | between a specified starting point and a specified end point in the |
| 797 | functions such as @code{syntax-ppss} | 797 | buffer. 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, | |||
| 851 | this element is @code{nil}. | 851 | this element is @code{nil}. |
| 852 | 852 | ||
| 853 | @item | 853 | @item |
| 854 | Internal data for continuing the parsing. The meaning of this | 854 | The list of the positions of the currently open parentheses, starting |
| 855 | data is subject to change; it is used if you pass this list | 855 | with the outermost. |
| 856 | as the @var{state} argument to another call. | 856 | |
| 857 | @item | ||
| 858 | When the last buffer position scanned was the (potential) first | ||
| 859 | character of a two character construct (comment delimiter or | ||
| 860 | escaped/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 |
| 860 | argument to continue parsing, and elements 8 and 9 are used only in | 866 | argument to continue parsing. Elements 9 and 10 are mainly used |
| 861 | trivial cases. Those elements are mainly used internally by the | 867 | internally by the parser code. |
| 862 | parser 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 |
| 865 | parser state using this function: | 870 | parser state using this function: |
| @@ -898,11 +903,11 @@ The depth starts at 0, or at whatever is given in @var{state}. | |||
| 898 | 903 | ||
| 899 | If the fourth argument @var{stop-before} is non-@code{nil}, parsing | 904 | If the fourth argument @var{stop-before} is non-@code{nil}, parsing |
| 900 | stops when it comes to any character that starts a sexp. If | 905 | stops 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 |
| 902 | start of an unnested comment. If @var{stop-comment} is the symbol | 907 | an 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 |
| 904 | comment or a string, or the end of an unnested comment or a string, | 909 | comment or a string, or after the end of an unnested comment or a |
| 905 | whichever comes first. | 910 | string, whichever comes first. |
| 906 | 911 | ||
| 907 | If @var{state} is @code{nil}, @var{start} is assumed to be at the top | 912 | If @var{state} is @code{nil}, @var{start} is assumed to be at the top |
| 908 | level of parenthesis structure, such as the beginning of a function | 913 | level of parenthesis structure, such as the beginning of a function |