diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-05 16:05:03 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-05 16:05:03 +0000 |
commit | 86a4cf04b78be492e4d3e05e2f60d87e4ddfa26f (patch) | |
tree | 53f39f944405dd2de6382efd0f82f3d83be9716f /lisp | |
parent | 2ae54507998bd3f0a95a53fb4ed64f1aea06065b (diff) | |
download | emacs-86a4cf04b78be492e4d3e05e2f60d87e4ddfa26f.tar.gz |
(electric-help-mode): Use add-hook mouse-leave-buffer-hook.
(electric-help-retain): Use remove-hook.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ehelp.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el index 5964157d748..14401f7c9a5 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el @@ -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 @@ will select it.)" (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 () |