]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el: Exit Isearch after deleting the frame (bug#41338).
authorJuri Linkov <juri@linkov.net>
Tue, 23 Jul 2024 18:00:23 +0000 (21:00 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 24 Jul 2024 16:57:48 +0000 (18:57 +0200)
(isearch-mode): Add 'isearch-done' to 'delete-frame-functions'.
(isearch-done): Remove 'isearch-done' from 'delete-frame-functions'.

(cherry picked from commit 19a18e487b8e2f0c1627b9cc98e601327e884eb2)

lisp/isearch.el

index fba82234b2f81f08e4a8a3aa501e2392deaa8ef6..feee63f45989307da107842e7fe101a7b2ab9a4d 100644 (file)
@@ -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