emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/backports-25.2 3713acd 36/46: Cancel the eldoc tim


From: Noam Postavsky
Subject: [Emacs-diffs] scratch/backports-25.2 3713acd 36/46: Cancel the eldoc timer when switching off eldoc mode
Date: Sun, 2 Oct 2016 14:04:50 +0000 (UTC)

branch: scratch/backports-25.2
commit 3713acd9de14255feeb65878a10d3407691187f4
Author: Lars Ingebrigtsen <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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).
    
    (cherry picked from commit b9d69380a110a86076b4f5b66c7ecdcb790d822d)
---
 lisp/emacs-lisp/eldoc.el |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 096102a..6c2f869 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]