diff options
| author | Richard M. Stallman | 2005-02-27 00:12:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-27 00:12:33 +0000 |
| commit | 8a2f014e40fa63d17cf48e3d56faa01c14f7df0a (patch) | |
| tree | f0721254e2aa2f9ff2d6011ae0e526fcc87a6192 /lispref | |
| parent | a87ffdbca993ceed4f5355103b2536c2e50042ee (diff) | |
| download | emacs-8a2f014e40fa63d17cf48e3d56faa01c14f7df0a.tar.gz emacs-8a2f014e40fa63d17cf48e3d56faa01c14f7df0a.zip | |
(Syntax Class Table): Clarify.
(Syntax Table Functions): syntax-after moved from here.
(Syntax Table Internals): syntax-after moved to here.
(Parsing Expressions): Update info on number of values
and what's meaningful in the STATE argument.
(Categories): Fix typo.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/syntax.texi | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/lispref/syntax.texi b/lispref/syntax.texi index 1dc1a2587e5..438c1815fe4 100644 --- a/lispref/syntax.texi +++ b/lispref/syntax.texi | |||
| @@ -155,9 +155,10 @@ character that is valid in symbols is underscore (@samp{_}). | |||
| 155 | @dfn{Punctuation characters} (designated by @samp{.}) are those | 155 | @dfn{Punctuation characters} (designated by @samp{.}) are those |
| 156 | characters that are used as punctuation in English, or are used in some | 156 | characters that are used as punctuation in English, or are used in some |
| 157 | way in a programming language to separate symbols from one another. | 157 | way in a programming language to separate symbols from one another. |
| 158 | Most programming language modes, including Emacs Lisp mode, have no | 158 | Some programming language modes, such as Emacs Lisp mode, have no |
| 159 | characters in this class since the few characters that are not symbol or | 159 | characters in this class since the few characters that are not symbol or |
| 160 | word constituents all have other uses. | 160 | word constituents all have other uses. Other programming language modes, |
| 161 | such as C mode, use punctuation syntax for operators. | ||
| 161 | @end deffn | 162 | @end deffn |
| 162 | 163 | ||
| 163 | @deffn {Syntax class} @w{open parenthesis character} | 164 | @deffn {Syntax class} @w{open parenthesis character} |
| @@ -501,12 +502,6 @@ We use @code{string} to make it easier to see the character returned by | |||
| 501 | @code{char-syntax}. | 502 | @code{char-syntax}. |
| 502 | @end defun | 503 | @end defun |
| 503 | 504 | ||
| 504 | @defun syntax-after pos | ||
| 505 | This function returns a description of the syntax of the character in | ||
| 506 | the buffer after position @var{pos}, taking account of syntax | ||
| 507 | properties as well as the syntax table. | ||
| 508 | @end defun | ||
| 509 | |||
| 510 | @defun set-syntax-table table | 505 | @defun set-syntax-table table |
| 511 | This function makes @var{table} the syntax table for the current buffer. | 506 | This function makes @var{table} the syntax table for the current buffer. |
| 512 | It returns @var{table}. | 507 | It returns @var{table}. |
| @@ -664,13 +659,13 @@ start of a comment. If @var{stop-comment} is the symbol | |||
| 664 | string, or the end of a comment or a string, whichever comes first. | 659 | string, or the end of a comment or a string, whichever comes first. |
| 665 | 660 | ||
| 666 | @cindex parse state | 661 | @cindex parse state |
| 667 | The fifth argument @var{state} is a nine-element list of the same form | 662 | The fifth argument @var{state} is a ten-element list of the same form |
| 668 | as the value of this function, described below. (It is OK to omit the | 663 | as the value of this function, described below. (It is OK to omit the |
| 669 | last element of the nine.) The return value of one call may be used to | 664 | last two elements of this list.) The return value of one call may be |
| 670 | initialize the state of the parse on another call to | 665 | used to initialize the state of the parse on another call to |
| 671 | @code{parse-partial-sexp}. | 666 | @code{parse-partial-sexp}. |
| 672 | 667 | ||
| 673 | The result is a list of nine elements describing the final state of | 668 | The result is a list of ten elements describing the final state of |
| 674 | the parse: | 669 | the parse: |
| 675 | 670 | ||
| 676 | @enumerate 0 | 671 | @enumerate 0 |
| @@ -717,15 +712,16 @@ The string or comment start position. While inside a comment, this is | |||
| 717 | the position where the comment began; while inside a string, this is the | 712 | the position where the comment began; while inside a string, this is the |
| 718 | position where the string began. When outside of strings and comments, | 713 | position where the string began. When outside of strings and comments, |
| 719 | this element is @code{nil}. | 714 | this element is @code{nil}. |
| 720 | @end enumerate | ||
| 721 | 715 | ||
| 722 | Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. | 716 | @item |
| 717 | Internal data for continuing the parsing. The meaning of this | ||
| 718 | data is subject to change; it is used if you pass this list | ||
| 719 | as the @var{state} argument to another call. | ||
| 720 | |||
| 721 | @end enumerate | ||
| 723 | 722 | ||
| 724 | Actually, the return value is currently a list of ten, rather than | 723 | Elements 0, 3, 4, 5, 7 and 9 are significant in the argument |
| 725 | nine, elements and @var{state} is allowed to be a list of ten elements | 724 | @var{state}. |
| 726 | as well. However, the meaning of the tenth element is subject to | ||
| 727 | change and only the first eight elements of @var{state} need to be | ||
| 728 | specified. | ||
| 729 | 725 | ||
| 730 | @cindex indenting with parentheses | 726 | @cindex indenting with parentheses |
| 731 | This function is most often used to compute indentation for languages | 727 | This function is most often used to compute indentation for languages |
| @@ -941,6 +937,12 @@ This function returns the internal form @code{(@var{syntax-code} . | |||
| 941 | @var{matching-char})} corresponding to the syntax descriptor @var{desc}. | 937 | @var{matching-char})} corresponding to the syntax descriptor @var{desc}. |
| 942 | @end defun | 938 | @end defun |
| 943 | 939 | ||
| 940 | @defun syntax-after pos | ||
| 941 | This function returns the syntax code of the character in the buffer | ||
| 942 | after position @var{pos}, taking account of syntax properties as well | ||
| 943 | as the syntax table. | ||
| 944 | @end defun | ||
| 945 | |||
| 944 | @node Categories | 946 | @node Categories |
| 945 | @section Categories | 947 | @section Categories |
| 946 | @cindex categories of characters | 948 | @cindex categories of characters |
| @@ -973,7 +975,7 @@ defaults to the current buffer's category table. | |||
| 973 | 975 | ||
| 974 | @defun define-category char docstring &optional table | 976 | @defun define-category char docstring &optional table |
| 975 | This function defines a new category, with name @var{char} and | 977 | This function defines a new category, with name @var{char} and |
| 976 | documentation @var{docstring}, for the category table @var{table}, | 978 | documentation @var{docstring}, for the category table @var{table}. |
| 977 | @end defun | 979 | @end defun |
| 978 | 980 | ||
| 979 | @defun category-docstring category &optional table | 981 | @defun category-docstring category &optional table |