[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22765: Missing interfaces for syntax of characters in buffers.
From: |
Alan Mackenzie |
Subject: |
bug#22765: Missing interfaces for syntax of characters in buffers. |
Date: |
Mon, 22 Feb 2016 11:12:12 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#22765: Missing interfaces for syntax of characters in buffers.,
Alan Mackenzie <=