+2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/timer.el (timer-event-handler): Don't retrigger a canceled
+ timer (bug#14156).
+
2013-04-07 Nic Ferrier <nferrier@ferrier.me.uk>
* emacs-lisp/ert.el (should, should-not, should-error): Add edebug
(save-current-buffer
(apply (timer--function timer) (timer--args timer)))
(error (message "Error in timer: %S" err)))
- (if retrigger
- (setf (timer--triggered timer) nil)))
+ (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"))))
;; This function is incompatible with the one in levents.el.