Commit 2e8174d2 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(electric-help-mode): Use add-hook mouse-leave-buffer-hook.

(electric-help-retain): Use remove-hook.
parent 408be661
......@@ -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 ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment