From: Eli Zaretskii Date: Wed, 24 Apr 2019 15:13:04 +0000 (+0300) Subject: Fix rescheduling timers after suspension X-Git-Tag: emacs-27.0.90~3106 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2b3c0ae5828810c6d24f3902bade125aee8b9e9c;p=emacs.git Fix rescheduling timers after suspension * lisp/emacs-lisp/timer.el (timer-event-handler): Fix the comparison between next invocation time and current time. --- 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)