From 82ba1a5a9aca4dff63f8f9e65c2ac0da27061dcc Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 21 Mar 2007 12:02:32 +0000 Subject: [PATCH] (server-process-filter): Cancel any pending isearch. --- lisp/server.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/server.el b/lisp/server.el index f03c802bb77..690f51034f2 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -414,6 +414,16 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." (run-with-timer 0 nil (lexical-let ((proc proc)) (lambda () (server-process-filter proc "")))) (top-level)) + (condition-case nil + ;; If we're running isearch, we must abort it to allow Emacs to + ;; display the buffer and switch to it. + (mapc #'(lambda (buffer) + (with-current-buffer buffer + (when (bound-and-true-p isearch-mode) + (isearch-cancel)))) + (buffer-list)) + ;; Signaled by isearch-cancel + (quit (message nil))) ;; If the input is multiple lines, ;; process each line individually. (while (string-match "\n" string) -- 2.39.5