Fix rescheduling timers after suspension

* lisp/emacs-lisp/timer.el (timer-event-handler): Fix the
comparison between next invocation time and current time.
This commit is contained in:
Eli Zaretskii 2019-04-24 18:13:04 +03:00
parent f6e6c1744b
commit 2b3c0ae582

View file

@ -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)