Only cancel timer when it is non-nil

* 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).
This commit is contained in:
Dmitry Gutov 2015-05-06 23:15:45 +03:00
parent ece365e673
commit 49a9e73f0a

View 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.