[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Minor fix to which-func-mode
From: |
David PONCE |
Subject: |
Minor fix to which-func-mode |
Date: |
Thu, 8 Jan 2004 09:09:15 +0100 (CET) |
Hi,
I submit you the following patch that fixes:
"cancel-timer: Invalid timer" errors when `which-func-mode' is
disabled and you turn it off (from a program or via customization).
Regards,
David
2004-01-08 David Ponce <address@hidden>
* progmodes/which-func.el (which-function-mode): Don't cancel
which-func-update-timer if not set.
Index: which-func.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/which-func.el,v
retrieving revision 1.3
diff -c -r1.3 which-func.el
*** which-func.el 30 Sep 2003 12:53:26 -0000 1.3
--- which-func.el 8 Jan 2004 08:01:06 -0000
***************
*** 198,204 ****
(or (eq which-func-modes t)
(member major-mode which-func-modes))))))
;; Turn it off
! (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)))))
--- 198,205 ----
(or (eq which-func-modes t)
(member major-mode which-func-modes))))))
;; Turn it off
! (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)))))
- Minor fix to which-func-mode,
David PONCE <=