GNU bug report logs - #30538
Elisp manual doesn't say how to get a raw syntax descriptor of a character.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Mon, 19 Feb 2018 20:46:02 UTC

Severity: minor

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30538 in the body.
You can then email your comments to 30538 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30538; Package emacs. (Mon, 19 Feb 2018 20:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 19 Feb 2018 20:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Elisp manual doesn't say how to get a raw syntax descriptor of a
 character.
Date: Mon, 19 Feb 2018 20:32:33 +0000
Hello, Emacs.

The title says it all.  Actually, in the early part of the Elisp manual,
it does say that `aref' works on char-tables.  And around the syntax part
of the manual, much later, it says that syntax tables are char-tables.

This makes it far too much work for somebody to find out what to do.
Therefore I suggest the following amendment, for Emacs-26:



diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index b37f2b22b8..585ecf760d 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -972,6 +972,9 @@ Syntax Table Internals
 below.  @var{matching-char}, if non-@code{nil}, specifies a matching
 character (similar to the second character in a syntax descriptor).
 
+Use @code{aref} (@pxref{Array Functions}) to get the raw syntax
+descriptor of a character, e.g. @code{(aref (syntax-table) ch)}.
+
   Here are the syntax codes corresponding to the various syntax
 classes:
 


-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30538; Package emacs. (Tue, 20 Feb 2018 18:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 30538 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 30538 <at> debbugs.gnu.org
Subject: Re: bug#30538: Elisp manual doesn't say how to get a raw syntax
 descriptor of a character.
Date: Tue, 20 Feb 2018 20:57:58 +0200
> Date: Mon, 19 Feb 2018 20:32:33 +0000
> From: Alan Mackenzie <acm <at> muc.de>
> 
> The title says it all.  Actually, in the early part of the Elisp manual,
> it does say that `aref' works on char-tables.  And around the syntax part
> of the manual, much later, it says that syntax tables are char-tables.
> 
> This makes it far too much work for somebody to find out what to do.
> Therefore I suggest the following amendment, for Emacs-26:

OK, but:

  . this should have an appropriate index entry, to allow finding this
    stuff easily
  . please take the code snipped in @w{..}, to avoid splitting it
    between lines.

Thanks.




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Thu, 22 Feb 2018 18:57:02 GMT) Full text and rfc822 format available.

Notification sent to Alan Mackenzie <acm <at> muc.de>:
bug acknowledged by developer. (Thu, 22 Feb 2018 18:57:02 GMT) Full text and rfc822 format available.

Message #13 received at 30538-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30538-done <at> debbugs.gnu.org
Subject: Re: bug#30538: Elisp manual doesn't say how to get a raw syntax
 descriptor of a character.
Date: Thu, 22 Feb 2018 18:43:09 +0000
Hello, Eli.

On Tue, Feb 20, 2018 at 20:57:58 +0200, Eli Zaretskii wrote:
> > Date: Mon, 19 Feb 2018 20:32:33 +0000
> > From: Alan Mackenzie <acm <at> muc.de>

> > The title says it all.  Actually, in the early part of the Elisp manual,
> > it does say that `aref' works on char-tables.  And around the syntax part
> > of the manual, much later, it says that syntax tables are char-tables.

> > This makes it far too much work for somebody to find out what to do.
> > Therefore I suggest the following amendment, for Emacs-26:

> OK, but:

>   . this should have an appropriate index entry, to allow finding this
>     stuff easily
>   . please take the code snipped in @w{..}, to avoid splitting it
>     between lines.

I've committed the patch (with the amendments you've requested) and am
closing the bug.

> Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Mar 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.