From 49a9e73f0a7d52a3c452d466097b2d14b1b8e126 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 6 May 2015 23:15:45 +0300 Subject: [PATCH] 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). --- lisp/cedet/pulse.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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. -- 2.39.2