]> git.eshelyaron.com Git - emacs.git/commitdiff
David Ponce <david@dponce.com>
authorGlenn Morris <rgm@gnu.org>
Sun, 18 Jan 2004 14:00:34 +0000 (14:00 +0000)
committerGlenn Morris <rgm@gnu.org>
Sun, 18 Jan 2004 14:00:34 +0000 (14:00 +0000)
(which-function-mode): Don't cancel which-func-update-timer if not set.

lisp/progmodes/which-func.el

index 4ffcddf48bfed53a9d3158c87a835d4dc3227bb6..fef159d850f581a551ae64d58e0a26a486b82f7b 100644 (file)
@@ -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)))))