Created
June 2, 2013 13:49
-
-
Save papaeye/5693703 to your computer and use it in GitHub Desktop.
A patch for bug#14156 to Emacs 24.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el | |
index 3eaacd2..efc7af3 100644 | |
--- a/lisp/emacs-lisp/timer.el | |
+++ b/lisp/emacs-lisp/timer.el | |
@@ -314,8 +314,12 @@ This function is called, by name, directly by the C code." | |
(save-current-buffer | |
(apply (timer--function timer) (timer--args timer))) | |
(error nil)) | |
- (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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment