emacs-devel
[Top][All Lists]
Advanced

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

Re: Looking at function


From: Stefan Monnier
Subject: Re: Looking at function
Date: Mon, 11 Jul 2022 20:29:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Dmitry Gutov [2022-07-12 03:19:42] wrote:
> On 11.07.2022 22:14, Juri Linkov wrote:
>>>> 1. Replace ‘looking-at’ with a call to the search function,
>>>>      but keep it at point by prepending ‘\\=’ to the regexp.
>>>>      Can it break a complex regexp?
>>>
>>> I suppose it can. Even a simple one (that has \\| inside without
>>> a grouping).
>> This is what the fix for xref successfully uses in bug#53758
>> with changes in perform-replace from bug#14013.  (However,
>> none of these variants is suitable for replacing another call
>> of looking-at in isearch-search-and-update.)
>
> Right. Because xref basically uses literal matching, no alternations.
> But it will break more complex cases.

I can't see why "\\=\\(?:...\\)" would break anything, personally.


        Stefan




reply via email to

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