bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) should


From: João Távora
Subject: bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol
Date: Sat, 09 Oct 2021 12:21:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 08 Oct 2021 19:01:40 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: 51089@debbugs.gnu.org, rms@gnu.org
>> 
>> > From: João Távora <joaotavora@gmail.com>
>> > Date: Fri, 8 Oct 2021 15:02:32 +0100
>> > Cc: 51089@debbugs.gnu.org, Richard Stallman <rms@gnu.org>
>> > 
>> > what is 
>> > the easiest C-way of checking if every character is a multibyte string is 
>> > punctuation?  Call into Elisp?
>> 
>> No need to call into Lisp.  See alphanumericp and friends in
>> character.c for how to do it.  We need a new function like those.  I
>> will post the general categories of punctuation characters in a while.
>
> Actually, do we care about non-ASCII characters in this context?
> Because if we only care about ASCII punctuation, it would be easier to
> provide an explicit string made of such characters and see if the
> character to test is in the string.  WDYT?

You mean iterate the string being analysed by bytes, and use strchr() on
byte_i and a constant you'll provide me?  And if we reach a byte that's
part of a multibyte one, we bail, knowing that it's not all ASCII
punctuation...  Is that the idea?  Should work, yes.

João





reply via email to

[Prev in Thread] Current Thread [Next in Thread]