* lisp/isearch.el (isearch-search-and-update): Let-bind 'isearch-cmds'.
authorJuri Linkov <juri@linkov.net>
Fri, 5 Jan 2024 07:39:04 +0000 (09:39 +0200)
committerJuri Linkov <juri@linkov.net>
Fri, 5 Jan 2024 07:40:05 +0000 (09:40 +0200)
When 'isearch-wrap-pause' is 'no' or 'no-ding', let-bind 'isearch-cmds'
to avoid changing it by 'isearch-push-state' in 'isearch-repeat',
so that a later DEL (isearch-delete-char) doesn't stop at the
intermediate failing state (bug#68158).

lisp/isearch.el

index ee5660309dfadf1ac86596cdd90c961176277b4f..f753a5377ca0a135474ff20e2362bacdaf846bf5 100644 (file)
@@ -2844,7 +2844,8 @@ The command accepts Unicode names like \"smiling face\" or
       (isearch-search)
       (when (and (memq isearch-wrap-pause '(no no-ding))
                  (not isearch-success))
-        (isearch-repeat (if isearch-forward 'forward 'backward)))))
+        (let ((isearch-cmds isearch-cmds))
+          (isearch-repeat (if isearch-forward 'forward 'backward))))))
   (isearch-push-state)
   (if isearch-op-fun (funcall isearch-op-fun))
   (isearch-update))