emacs-devel
[Top][All Lists]
Advanced

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

Re: Looking at function


From: Dmitry Gutov
Subject: Re: Looking at function
Date: Wed, 17 Aug 2022 03:23:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 12.07.2022 03:29, Stefan Monnier wrote:
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.

Right.

But I suppose this approach could be problematic when isearch-regexp-function or isearch-search-fun-function have non-default and some distinctly weird values/specialized behaviors.



reply via email to

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