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

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

bug#64652: 28.2; Adding a property bug on Windows 11


From: Mattias Engdegård
Subject: bug#64652: 28.2; Adding a property bug on Windows 11
Date: Sun, 16 Jul 2023 13:07:01 +0200

16 juli 2023 kl. 12.25 skrev Ihor Radchenko <yantar92@posteo.net>:

> Eli Zaretskii <eliz@gnu.org> writes:
> 
>>> Hmm... One way could be modifying regexps to something like
>>> [Pp][Rr][Oo][Pp][Ee][Rr][Tt][Ii][Ee][Ss]. May Emacs provide something
>>> like (regexp-case-quote REGEXP &optional CASE-TABLE)?
>> 
>> What would regexp-case-quote do with REGEXP?
>> 
>> Regarding [Pp][Rr] etc.: does this have any significant effect on
>> performance, due to use of character classes?

Yes, that would be substantially slower. The regexp engine combines sequences 
of literal characters into literal strings that are matched atomically, without 
either the overhead of individual NFA ops or pushing backtracking points on the 
NFA stack for each character.

Indeed a quick micro-benchmark bears that out.

How much that affects performance overall is a different matter and can only be 
answered by measuring.

In general we should make an effort to stop the user's locale leaking into 
elisp code logic. Ideally, case-folding should be property of a regexp or part 
of it, not controlled by a user-customisable global variable.

I'm just waiting for the horde of irate Turkish Pascal programmers to complain 
about broken font-lock.






reply via email to

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