From: Juri Linkov Date: Tue, 23 Jul 2024 18:00:23 +0000 (+0300) Subject: * lisp/isearch.el: Exit Isearch after deleting the frame (bug#41338). X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=04d9abe9f06529207f9c48f583fa4a8e7a6da4e0;p=emacs.git * lisp/isearch.el: Exit Isearch after deleting the frame (bug#41338). (isearch-mode): Add 'isearch-done' to 'delete-frame-functions'. (isearch-done): Remove 'isearch-done' from 'delete-frame-functions'. (cherry picked from commit 19a18e487b8e2f0c1627b9cc98e601327e884eb2) --- diff --git a/lisp/isearch.el b/lisp/isearch.el index fba82234b2f..feee63f4598 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1313,6 +1313,7 @@ used to set the value of `isearch-regexp-function'." (add-hook 'pre-command-hook 'isearch-pre-command-hook) (add-hook 'post-command-hook 'isearch-post-command-hook) (add-hook 'mouse-leave-buffer-hook 'isearch-mouse-leave-buffer) + (add-hook 'delete-frame-functions 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done) ;; If the keyboard is not up and the last event did not come from @@ -1432,6 +1433,7 @@ If NOPUSH is non-nil, we don't push the string on the search ring." (remove-hook 'pre-command-hook 'isearch-pre-command-hook) (remove-hook 'post-command-hook 'isearch-post-command-hook) (remove-hook 'mouse-leave-buffer-hook 'isearch-mouse-leave-buffer) + (remove-hook 'delete-frame-functions 'isearch-done) (remove-hook 'kbd-macro-termination-hook 'isearch-done) (when (buffer-live-p isearch--current-buffer) (with-current-buffer isearch--current-buffer