]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix rescheduling timers after suspension
authorEli Zaretskii <eliz@gnu.org>
Wed, 24 Apr 2019 15:13:04 +0000 (18:13 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 24 Apr 2019 15:13:04 +0000 (18:13 +0300)
* lisp/emacs-lisp/timer.el (timer-event-handler): Fix the
comparison between next invocation time and current time.

lisp/emacs-lisp/timer.el

index f706d9bc6262bc0e7a82b3f5374d9cafd3490e6e..22ccc35103a7009e8e128669116ce39050e74874 100644 (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)