Mercurial > emacs
diff lisp/ehelp.el @ 14943:2c44547d2364
(electric-help-mode): Use add-hook mouse-leave-buffer-hook.
(electric-help-retain): Use remove-hook.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 05 Apr 1996 16:05:03 +0000 |
parents | b4879ed5b5c3 |
children | f1e444468043 |
line wrap: on
line diff
--- a/lisp/ehelp.el Fri Apr 05 16:03:20 1996 +0000 +++ b/lisp/ehelp.el Fri Apr 05 16:05:03 1996 +0000 @@ -88,7 +88,7 @@ (setq major-mode 'help) (setq mode-line-buffer-identification '(" Help: %b")) (use-local-map electric-help-map) - (setq mouse-leave-buffer-hook '(electric-help-retain)) + (add-hook 'mouse-leave-buffer-hook 'electric-help-retain) (view-mode -1) ;; this is done below in with-electric-help ;(run-hooks 'electric-help-mode-hook) @@ -232,10 +232,10 @@ (interactive) ;; Make sure that we don't throw twice, even if two events cause ;; calling this function: - (if mouse-leave-buffer-hook - (progn - (setq mouse-leave-buffer-hook nil) - (throw 'exit '(retain))))) + (if (memq 'electric-help-retain mouse-leave-buffer-hook) + (progn + (remove-hook 'mouse-leave-buffer-hook 'electric-help-retain) + (throw 'exit '(retain))))) (defun electric-help-undefined ()