From: Alan Mackenzie <acm@muc.de>
To: 22765@debbugs.gnu.org
Subject: bug#22765: Missing interfaces for syntax of characters in buffers.
Date: Mon, 22 Feb 2016 11:12:12 +0000 [thread overview]
Message-ID: <20160222111212.GC1984@acm.fritz.box> (raw)
Hello, Emacs.
In all versions of Emacs to date, we are missing an interface to return
the syntax of a character in a buffer in a "nice" form. By a "nice"
form, I mean the characters ?\ , ?., ?w, ?\(, ?\), etc., which programs
should be able to use.
We have `char-syntax', but that takes no account of syntax-table text
properties which might be on a buffer position, and so shouldn't really
be used any more in buffers. There are still around 160 uses of
`char-syntax' in our sources.
We have `syntax-after', but this returns a raw syntax descriptor (like
(4 . 41)), and we have no means of extracting ?\( from this.
I propose adding the two functions `syntax-class-to-char' which would
convert 4 to ?\(, and `char-syntax-after', which would return ?\(
directly, given a buffer position with such a character under it.
This would greatly aid in the conversion of these old `char-syntax'
calls.
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2016-02-22 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 11:12 Alan Mackenzie [this message]
2017-04-06 0:43 ` bug#22765: Missing interfaces for syntax of characters in buffers npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160222111212.GC1984@acm.fritz.box \
--to=acm@muc.de \
--cc=22765@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.