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

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

bug#64019: 29.0.91; Fix some tree-sitter :match regexps


From: Andreas Schwab
Subject: bug#64019: 29.0.91; Fix some tree-sitter :match regexps
Date: Sat, 17 Jun 2023 08:48:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Jun 17 2023, Dmitry Gutov wrote:

> On 15/06/2023 20:17, Basil Contovounesios wrote:
>> Mattias also spotted the following in
>> https://github.com/mattiase/relint/pull/14:
>> -                              (:match "\\`?[#\"'`:?]" @char))
>> +                              (:match "\\`\\?[#\"'`:?]" @char))
>
> I don't mind, but it seems like both versions do the same thing:
>
> (string-match-p "\\`?!" "?!") => 0
>
> (string-match-p "\\`?!" "!") => nil

This depends on `?' being treated as an ordinary character if occuring
in a context where the special meaning does not make sense, which is
poor practice.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





reply via email to

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