mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(electric-help-mode): Use add-hook mouse-leave-buffer-hook.
(electric-help-retain): Use remove-hook.
This commit is contained in:
parent
408be6610b
commit
2e8174d2ce
1 changed files with 5 additions and 5 deletions
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue