emacs-devel
[Top][All Lists]
Advanced

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

Re: Looking at function


From: Juri Linkov
Subject: Re: Looking at function
Date: Fri, 01 Jul 2022 18:49:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> 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 can't see why.  Of course, you want to use \\=\\(?:...\\) but
> that should be reliable.

I confirm that \\= works reliable, but discovered that not all
search functions can be used instead of looking-at
in isearch-search-and-update.  When calling a search function
that searches through the minibuffer history in the minibuffer,
it tries to find \\= in every minibuffer history item and
eventually messes up the minibuffer contents.
So looking-at can't be replaced in isearch-search-and-update.

There is no problem with replacing looking-at with searching \\=
in perform-replace since it uses the default search function
that can be overridden by replace-re-search-function, and
no one sets replace-re-search-function to a function that
tries to do replacements through all minibuffer history items.



reply via email to

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