From: Glenn Morris Date: Sun, 18 Jan 2004 14:00:34 +0000 (+0000) Subject: David Ponce X-Git-Tag: ttn-vms-21-2-B4~7904 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f2633782cdabe68ab1e02aabb0fb2697ae107ab3;p=emacs.git David Ponce (which-function-mode): Don't cancel which-func-update-timer if not set. --- 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)))))