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: Sun, 10 Oct 2021 14:42:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Cc: 51089@debbugs.gnu.org,  rms@gnu.org
>> Date: Sat, 09 Oct 2021 12:21:36 +0100
>> 
>> > 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.
>
> Yes.  But I think we could use strcspn for an easier, one-line, test
> of the same.

OK.  I've now pushed a failing test that should pass once the fix is in
place.  I'll follow up with that later, after reading up on strcpsn().
If someone wants to beats me to it, I recommend reusing the existing
boolean variable skip_shorthand in lread.c.  A tweak to the manual
describing this exception is probably also needed.

João





reply via email to

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