From f2633782cdabe68ab1e02aabb0fb2697ae107ab3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 18 Jan 2004 14:00:34 +0000 Subject: [PATCH] David Ponce (which-function-mode): Don't cancel which-func-update-timer if not set. --- lisp/progmodes/which-func.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 4ffcddf48bf..fef159d850f 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -198,7 +198,8 @@ and off otherwise." (or (eq which-func-modes t) (member major-mode which-func-modes)))))) ;; Turn it off - (cancel-timer which-func-update-timer) + (when (timerp which-func-update-timer) + (cancel-timer which-func-update-timer)) (setq which-func-update-timer nil) (dolist (buf (buffer-list)) (with-current-buffer buf (setq which-func-mode nil))))) -- 2.11.4.GIT