]> code.delx.au - gnu-emacs/blobdiff - lispref/syntax.texi
(List Variables): Document COMPARE-FN.
[gnu-emacs] / lispref / syntax.texi
index 282cbca794d638b9fb4acfb00eb880c7a60f3f84..54b0d4a0bc06b4e599e4d561ab03354e1889fe11 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004, 2005
-@c   Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003,
+@c   2004, 2005, 2006 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/syntax
 @node Syntax Tables, Abbrevs, Searching and Matching, Top
@@ -332,8 +332,8 @@ Emacs supports two comment styles simultaneously in any one syntax
 table.  This is for the sake of C++.  Each style of comment syntax has
 its own comment-start sequence and its own comment-end sequence.  Each
 comment must stick to one style or the other; thus, if it starts with
-the comment-start sequence of style ``b'', it must also end with the
-comment-end sequence of style ``b''.
+the comment-start sequence of style ``b,'' it must also end with the
+comment-end sequence of style ``b.''
 
 The two comment-start sequences must begin with the same character; only
 the second character may differ.  Mark the second character of the
@@ -512,8 +512,7 @@ This function returns the current syntax table, which is the table for
 the current buffer.
 @end defun
 
-@defmac with-syntax-table @var{table} @var{body}...
-@tindex with-syntax-table
+@defmac with-syntax-table @var{table} @var{body}@dots{}
 This macro executes @var{body} using @var{table} as the current syntax
 table.  It returns the value of the last form in @var{body}, after
 restoring the old current syntax table.
@@ -662,17 +661,18 @@ string, or the end of a comment or a string, whichever comes first.
 
 @cindex parse state
 The fifth argument @var{state} is a ten-element list of the same form
-as the value of this function, described below.  (It is OK to omit the
-last two elements of this list.)  The return value of one call may be
-used to initialize the state of the parse on another call to
-@code{parse-partial-sexp}.
+as the value of this function, described below.  The return value of
+one call may be used to initialize the state of the parse on another
+call to @code{parse-partial-sexp}.
 
 The result is a list of ten elements describing the final state of
 the parse:
 
 @enumerate 0
 @item
-The depth in parentheses, counting from 0.
+The depth in parentheses, counting from 0.  @strong{Warning:} this can
+be negative if there are more close parens than open parens between
+the start of the defun and point.
 
 @item
 @cindex innermost containing parentheses
@@ -706,7 +706,7 @@ The minimum parenthesis depth encountered during this scan.
 @item
 What kind of comment is active: @code{nil} for a comment of style
 ``a'' or when not inside a comment, @code{t} for a comment of style
-``b'', and @code{syntax-table} for a comment that should be ended by a
+``b,'' and @code{syntax-table} for a comment that should be ended by a
 generic comment delimiter character.
 
 @item
@@ -719,11 +719,13 @@ this element is @code{nil}.
 Internal data for continuing the parsing.  The meaning of this
 data is subject to change; it is used if you pass this list
 as the @var{state} argument to another call.
-
 @end enumerate
 
-Elements 0, 3, 4, 5, 7 and 9 are significant in the argument
-@var{state}.
+Elements 1, 2, and 6 are ignored in the argument @var{state}.  Element
+8 is used only to set the corresponding element of the return value,
+in certain simple cases.  Element 9 is used only to set element 1 of
+the return value, in trivial cases where parsing starts and stops
+within the same pair of parentheses.
 
 @cindex indenting with parentheses
 This function is most often used to compute indentation for languages
@@ -796,7 +798,6 @@ before count is used up, @code{nil} is returned.
 @end defun
 
 @defvar multibyte-syntax-as-symbol
-@tindex multibyte-syntax-as-symbol
 If this variable is non-@code{nil}, @code{scan-sexps} treats all
 non-@acronym{ASCII} characters as symbol constituents regardless
 of what the syntax table says about them.  (However, text properties
@@ -883,7 +884,7 @@ a character to match was specified.
   This table gives the value of @var{syntax-code} which corresponds
 to each syntactic type.
 
-@multitable @columnfractions .05 .3 .3 .3
+@multitable @columnfractions .05 .3 .3 .31
 @item
 @tab
 @i{Integer} @i{Class}
@@ -1073,7 +1074,6 @@ buffer.  It returns @var{table}.
 @end defun
 
 @defun make-category-table
-@tindex make-category-table
 This creates and returns an empty category table.  In an empty category
 table, no categories have been allocated, and no characters belong to
 any categories.