changeset 53618:bd715b02e44e

David Ponce <david@dponce.com> (which-function-mode): Don't cancel which-func-update-timer if not set.
author Glenn Morris <rgm@gnu.org>
date Sun, 18 Jan 2004 14:00:34 +0000
parents 6b7597ec2d66
children f69d407a9996
files lisp/progmodes/which-func.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/which-func.el	Sun Jan 18 03:15:25 2004 +0000
+++ b/lisp/progmodes/which-func.el	Sun Jan 18 14:00:34 2004 +0000
@@ -198,7 +198,8 @@
                   (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)))))