Commit 2b3c0ae5 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix rescheduling timers after suspension

* lisp/emacs-lisp/timer.el (timer-event-handler): Fix the
comparison between next invocation time and current time.
parent f6e6c174
Pipeline #1440 failed with stage
in 54 minutes and 41 seconds
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment