From 2b3c0ae5828810c6d24f3902bade125aee8b9e9c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 24 Apr 2019 18:13:04 +0300 Subject: [PATCH] Fix rescheduling timers after suspension * lisp/emacs-lisp/timer.el (timer-event-handler): Fix the comparison between next invocation time and current time. --- lisp/emacs-lisp/timer.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index f706d9bc626..22ccc35103a 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -281,7 +281,7 @@ This function is called, by name, directly by the C code." ;; perhaps because Emacs was suspended for a long time, ;; limit how many times things get repeated. (if (and (numberp timer-max-repeats) - (time-less-p nil (timer--time timer))) + (time-less-p (timer--time timer) nil)) (let ((repeats (/ (timer-until timer nil) (timer--repeat-delay timer)))) (if (> repeats timer-max-repeats) -- 2.39.2