unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Minor fix to which-func-mode
@ 2004-01-08  8:09 David PONCE
  2004-01-18 14:01 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: David PONCE @ 2004-01-08  8:09 UTC (permalink / raw)


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  <david@dponce.com>

	* 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)))))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Minor fix to which-func-mode
  2004-01-08  8:09 Minor fix to which-func-mode David PONCE
@ 2004-01-18 14:01 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2004-01-18 14:01 UTC (permalink / raw)
  Cc: emacs-devel

David PONCE wrote:

> 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).

Thanks. Now installed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-18 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08  8:09 Minor fix to which-func-mode David PONCE
2004-01-18 14:01 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).