summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9f3cfd70fb3..536c76ea5df 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3506,9 +3506,8 @@ Optional third argument, if t, means if fail just return nil (no error).
(when pos1
;; When using multiple buffers isearch, switch to the new buffer here,
;; because `save-excursion' above doesn't allow doing it inside funcall.
- (if (and multi-isearch-next-buffer-current-function
- (buffer-live-p multi-isearch-current-buffer))
- (switch-to-buffer multi-isearch-current-buffer))
+ (when multi-isearch-next-buffer-current-function
+ (multi-isearch-switch-buffer))
(goto-char pos1)
pos1)))