(server-process-filter): Cancel any pending isearch.

This commit is contained in:
Juanma Barranquero 2007-03-21 12:02:32 +00:00
parent 76b0b55fd6
commit 82ba1a5a9a

View file

@ -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)