all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David PONCE <david.ponce@wanadoo.fr>
Subject: Minor fix to which-func-mode
Date: Thu,  8 Jan 2004 09:09:15 +0100 (CET)	[thread overview]
Message-ID: <26653837.1073549355046.JavaMail.www@wwinf0301> (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)))))

             reply	other threads:[~2004-01-08  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-08  8:09 David PONCE [this message]
2004-01-18 14:01 ` Minor fix to which-func-mode Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26653837.1073549355046.JavaMail.www@wwinf0301 \
    --to=david.ponce@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.