[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14156: 24.3.50; Timer firing after being canceled

From: Stefan Monnier
Subject: bug#14156: 24.3.50; Timer firing after being canceled
Date: Sun, 07 Apr 2013 22:09:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> If you call `start-the-timer', you get the message "Why is this ever
> reached?" over and over.  This obviously should not happen.

As mentioned elsewhere, this seems to be due to patch

   revno: 110138
   fixes bugs: http://debbugs.gnu.org/12447 http://debbugs.gnu.org/12326

I installed the patch below which seems to fix it.


=== modified file 'lisp/emacs-lisp/timer.el'
--- lisp/emacs-lisp/timer.el    2013-01-13 01:23:48 +0000
+++ lisp/emacs-lisp/timer.el    2013-04-08 01:53:53 +0000
@@ -314,7 +314,11 @@
                 (apply (timer--function timer) (timer--args timer)))
            (error (message "Error in timer: %S" err)))
-         (if retrigger
+         (when (and retrigger
+                     ;; If the timer's been canceled, don't "retrigger" it
+                     ;; since it might still be in the copy of timer-list kept
+                     ;; by keyboard.c:timer_check (bug#14156).
+                     (memq timer timer-list))
              (setf (timer--triggered timer) nil)))
       (error "Bogus timer event"))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]