GNU bug report logs -
#12383
[Patch] Clarify the distinction between "syntax codes" and the cons cells that contain them
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12383 in the body.
You can then email your comments to 12383 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12383
; Package
emacs
.
(Sat, 08 Sep 2012 00:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nathan Trapuzzano <nbtrap <at> nbtrap.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 08 Sep 2012 00:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The lispref info node on "Syntax Table Internals" uses "syntax code"
interchangeably to refer to both the car of syntax table elements and
the elements (cons cells) themselves. This is confusing, for example,
because the function "syntax-class" throws a wrong-type-argument error
if its argument is the bare integer syntax code instead of a cons
cell. I propose the following minor changes:
[syntax.texi.patch (text/x-patch, inline)]
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 91ae435..fa000c3 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -996,18 +996,20 @@ corresponding internal form, a cons cell @code{(@var{syntax-code}
@end defun
@defun syntax-after pos
-This function returns the syntax code of the character in the buffer
-after position @var{pos}, taking account of syntax properties as well
-as the syntax table. If @var{pos} is outside the buffer's accessible
-portion (@pxref{Narrowing, accessible portion}), this function returns
+This function returns the syntax cons cell @code{(@var{syntax-code}
+. @var{matching-char})} of the character in the buffer after position
+@var{pos}, taking account of syntax properties as well as the syntax
+table. If @var{pos} is outside the buffer's accessible portion
+(@pxref{Narrowing, accessible portion}), this function returns
@code{nil}.
@end defun
@defun syntax-class syntax
-This function returns the syntax class of the syntax code
+This function returns the syntax class of the syntax table entry
@var{syntax}. (It masks off the high 16 bits that hold the flags
-encoded in the syntax descriptor.) If @var{syntax} is @code{nil}, it
-returns @code{nil}; this is so evaluating the expression
+encoded in the syntax descriptor given by the car of @var{syntax}.)
+If @var{syntax} is @code{nil}, it returns @code{nil}; this is so
+evaluating the expression
@example
(syntax-class (syntax-after pos))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12383
; Package
emacs
.
(Sat, 08 Sep 2012 14:26:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12383 <at> debbugs.gnu.org (full text, mbox):
Nathan Trapuzzano <nbtrap <at> nbtrap.com> writes:
> The lispref info node on "Syntax Table Internals" uses "syntax code"
> interchangeably to refer to both the car of syntax table elements and
> the elements (cons cells) themselves. This is confusing, for example,
> because the function "syntax-class" throws a wrong-type-argument error
> if its argument is the bare integer syntax code instead of a cons
> cell. I propose the following minor changes:
Thank you for the suggestion. It is on the right track, but I think the
fix needs to go further. We need a new terminology for the cons cells
stored in the syntax table. I think a good name is "raw syntax
descriptors", and I've amended the manual and docstrings accordingly.
bug closed, send any further explanations to
12383 <at> debbugs.gnu.org and Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 08 Sep 2012 14:26:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 07 Oct 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.