Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char folding enabled

From: Juri Linkov <[email-masked]>
Date: Tue, 07 Dec 2021 22:07:48 +0200

>> when I use Isearch with char folding enabled, the prompt changes very
>> briefly at every character I type in. The actual prompt depends on the
>> values of ‘lazy-count-*-format’ and ‘search-default-mode’ (if they all
>> have their default value the prompt is ‘Pending char-fold I-search:…’;
>> with the settings described below it’s just ‘I-search: …’, and it
>> changes briefly to ‘Pending I-search: …’).
>
> Thanks for the bug report.  Some time ago I proposed the following patch:
>
> -		   (if isearch-adjusted "pending " "")

But many functions in isearch.el set isearch-adjusted for a reason.
So maybe better to fix only the reported case with:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 75a80840d6..065f6b3c2a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3571,7 +3571,7 @@ isearch-search-fun
 
 (defun isearch--lax-regexp-function-p ()
   "Non-nil if next regexp-function call should be lax."
-  (or (memq this-command '(isearch-printing-char isearch-del-char))
+  (or (memq this-command '(isearch-del-char))
       isearch-yank-flag))
--