summaryrefslogtreecommitdiff
path: root/lispref/syntax.texi
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-05-08 20:12:56 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-05-08 20:12:56 +0000
commit3a2cdaaa647fe47b53ceec376d40868cf3723323 (patch)
tree2546fb3a1d52db8a17b4741672abb9377996d72a /lispref/syntax.texi
parent260503ca914c2674b462c9c1379ee9167db063ec (diff)
downloademacs-3a2cdaaa647fe47b53ceec376d40868cf3723323.tar.gz
(Syntax Class Table): Add the missing designator for
comment and string fences. (Syntax Properties): Add a xref to syntax table internals. (Syntax Table Internals): Document string-to-syntax.
Diffstat (limited to 'lispref/syntax.texi')
-rw-r--r--lispref/syntax.texi27
1 files changed, 16 insertions, 11 deletions
diff --git a/lispref/syntax.texi b/lispref/syntax.texi
index 9ac397afb3f..d1cb99f2f60 100644
--- a/lispref/syntax.texi
+++ b/lispref/syntax.texi
@@ -259,11 +259,11 @@ designator for this syntax code is @samp{@@}.
@end deffn
@deffn {Syntax class} @w{generic comment delimiter}
-A @dfn{generic comment delimiter} character starts or ends a special
-kind of comment. @emph{Any} generic comment delimiter matches
-@emph{any} generic comment delimiter, but they cannot match a comment
-starter or comment ender; generic comment delimiters can only match each
-other.
+A @dfn{generic comment delimiter} (designated by @samp{!}) starts
+or ends a special kind of comment. @emph{Any} generic comment delimiter
+matches @emph{any} generic comment delimiter, but they cannot match
+a comment starter or comment ender; generic comment delimiters can only
+match each other.
This syntax class is primarily meant for use with the
@code{syntax-table} text property (@pxref{Syntax Properties}). You can
@@ -273,10 +273,10 @@ identifying them as generic comment delimiters.
@end deffn
@deffn {Syntax class} @w{generic string delimiter}
-A @dfn{generic string delimiter} character starts or ends a string.
-This class differs from the string quote class in that @emph{any}
-generic string delimiter can match any other generic string delimiter;
-but they do not match ordinary string quote characters.
+A @dfn{generic string delimiter} (designated by @samp{|}) starts or ends
+a string. This class differs from the string quote class in that @emph{any}
+generic string delimiter can match any other generic string delimiter; but
+they do not match ordinary string quote characters.
This syntax class is primarily meant for use with the
@code{syntax-table} text property (@pxref{Syntax Properties}). You can
@@ -539,7 +539,7 @@ occurrence of the character.
@item @code{(@var{syntax-code} . @var{matching-char})}
A cons cell of this format specifies the syntax for this
-occurrence of the character.
+occurrence of the character. (@pxref{Syntax Table Internals})
@item @code{nil}
If the property is @code{nil}, the character's syntax is determined from
@@ -788,7 +788,8 @@ function.)
Lisp programs don't usually work with the elements directly; the
Lisp-level syntax table functions usually work with syntax descriptors
(@pxref{Syntax Descriptors}). Nonetheless, here we document the
-internal format.
+internal format. This format is used mostly when manipulating
+syntax properties.
Each element of a syntax table is a cons cell of the form
@code{(@var{syntax-code} . @var{matching-char})}. The @sc{car},
@@ -881,6 +882,10 @@ corresponds to each syntax flag.
@samp{3} @ @ @code{(lsh 1 18)}
@end multitable
+@defun string-to-syntax @var{desc}
+This function returns the internal form @code{(@var{syntax-code} .
+@var{matching-char})} corresponding to the syntax descriptor @var{desc}.
+
@node Categories
@section Categories
@cindex categories of characters