diff options
| author | Lars Ingebrigtsen | 2016-04-29 22:06:37 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-04-29 22:06:37 +0200 |
| commit | b9d69380a110a86076b4f5b66c7ecdcb790d822d (patch) | |
| tree | 0ad3305b6dbedebff19b084d8a5d9ff2065b3a72 | |
| parent | 3a33afe25d8518f194fa4706eaccdb2a786a0348 (diff) | |
| download | emacs-b9d69380a110a86076b4f5b66c7ecdcb790d822d.tar.gz emacs-b9d69380a110a86076b4f5b66c7ecdcb790d822d.zip | |
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).
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index d5e7178b226..bc5a78bd086 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -197,7 +197,10 @@ expression point is on." | |||
| 197 | (t | 197 | (t |
| 198 | (kill-local-variable 'eldoc-message-commands) | 198 | (kill-local-variable 'eldoc-message-commands) |
| 199 | (remove-hook 'post-command-hook 'eldoc-schedule-timer t) | 199 | (remove-hook 'post-command-hook 'eldoc-schedule-timer t) |
| 200 | (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)))) | 200 | (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t) |
| 201 | (when eldoc-timer | ||
| 202 | (cancel-timer eldoc-timer) | ||
| 203 | (setq eldoc-timer nil))))) | ||
| 201 | 204 | ||
| 202 | ;;;###autoload | 205 | ;;;###autoload |
| 203 | (define-minor-mode global-eldoc-mode | 206 | (define-minor-mode global-eldoc-mode |