From: Dmitry Gutov Date: Wed, 6 May 2015 20:15:45 +0000 (+0300) Subject: Only cancel timer when it is non-nil X-Git-Tag: emacs-25.0.90~2172 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49a9e73f0a7d52a3c452d466097b2d14b1b8e126;p=emacs.git 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). --- diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 67ad31a01c9..39ba13c33df 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -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.