# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 828635939 0
# Node ID c0e8ab5d23fce8c548e23555156f9b5d5b2eb7c7
# Parent  e4f4dc22f5a37f751943e907cc12b5abb807cfeb
(isearch-mode): Use add-hook for mouse-leave-buffer-hook.
(isearch-done): Use remove-hook.

diff -r e4f4dc22f5a3 -r c0e8ab5d23fc lisp/isearch.el
--- a/lisp/isearch.el	Thu Apr 04 16:35:55 1996 +0000
+++ b/lisp/isearch.el	Thu Apr 04 16:38:59 1996 +0000
@@ -475,7 +475,7 @@
   (isearch-update)
   (run-hooks 'isearch-mode-hook)
 
-  (setq mouse-leave-buffer-hook '(isearch-done))
+  (add-hook 'mouse-leave-buffer-hook 'isearch-done)
 
   ;; isearch-mode can be made modal (in the sense of not returning to 
   ;; the calling function until searching is completed) by entering 
@@ -525,7 +525,7 @@
   )
 
 (defun isearch-done (&optional nopush edit)
-  (setq mouse-leave-buffer-hook nil)
+  (remove-hook 'mouse-leave-buffer-hook 'isearch-done)
   ;; Called by all commands that terminate isearch-mode.
   ;; If NOPUSH is non-nil, we don't push the string on the search ring.
   (setq overriding-terminal-local-map nil)