]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/replace.el (perform-replace): Allow using isearch in recursive-edit.
authorJuri Linkov <juri@linkov.net>
Tue, 8 Feb 2022 19:35:12 +0000 (21:35 +0200)
committerJuri Linkov <juri@linkov.net>
Tue, 8 Feb 2022 19:35:12 +0000 (21:35 +0200)
Let-bind isearch-filter-predicate to the default value before calling
recursive-edit to allow using isearch in a recursive edit (bug#53758).

lisp/replace.el

index 23e6483809ccd9fa10c487e350f13a8006b2d38b..06be597855488afa5406294445ca99e71656e358 100644 (file)
@@ -3233,7 +3233,13 @@ characters."
                               (last-command 'recenter-top-bottom))
                           (recenter-top-bottom)))
                        ((eq def 'edit)
-                        (let ((opos (point-marker)))
+                        (let ((opos (point-marker))
+                              ;; Restore original isearch filter to allow
+                              ;; using isearch in a recursive edit even
+                              ;; when perform-replace was started from
+                              ;; `xref--query-replace-1' that let-binds
+                              ;; `isearch-filter-predicate' (bug#53758).
+                              (isearch-filter-predicate #'isearch-filter-visible))
                           (setq real-match-data (replace-match-data
                                                  nil real-match-data
                                                  real-match-data))