]> git.eshelyaron.com Git - emacs.git/commitdiff
Only cancel timer when it is non-nil
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 6 May 2015 20:15:45 +0000 (23:15 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 6 May 2015 20:15:54 +0000 (23:15 +0300)
* lisp/cedet/pulse.el (pulse-momentary-unhighlight): Only cancel
timer when it is non-nil
(http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00223.html).

lisp/cedet/pulse.el

index 67ad31a01c94039b926234af8f59d47f45a181ca..39ba13c33df8224f7c011b812a54b7ddda2cfa0d 100644 (file)
@@ -215,9 +215,10 @@ Optional argument FACE specifies the face to do the highlighting."
     (setq pulse-momentary-overlay nil)
 
     ;; Reset the pulsing face.
-    (pulse-reset-face)
+    (pulse-reset-face))
 
-    ;; Cancel the timer.
+  ;; Cancel the timer.
+  (when pulse-momentary-timer
     (cancel-timer pulse-momentary-timer))
 
   ;; Remove this hook.