1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

Cancel the eldoc timer when switching off eldoc mode

* lisp/emacs-lisp/eldoc.el (eldoc-mode): Cancel the eldoc
timer when switching off eldoc mode.  It will be restarted
again if needed (bug#17582).
This commit is contained in:
Lars Ingebrigtsen 2016-04-29 22:06:37 +02:00
parent 3a33afe25d
commit b9d69380a1

View file

@ -197,7 +197,10 @@ expression point is on."
(t
(kill-local-variable 'eldoc-message-commands)
(remove-hook 'post-command-hook 'eldoc-schedule-timer t)
(remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t))))
(remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)
(when eldoc-timer
(cancel-timer eldoc-timer)
(setq eldoc-timer nil)))))
;;;###autoload
(define-minor-mode global-eldoc-mode