Commit 82d4b987 authored by Eli Zaretskii's avatar Eli Zaretskii

Avoid errors in Auto Revert mode

* lisp/autorevert.el (auto-revert-buffers): Cancel
auto-revert-timer only if it is non-nil.  This avoids errors
on first invocation of Auto-Revert mode.
parent a3b19351
Pipeline #956 passed with stage
in 31 minutes and 46 seconds
......@@ -813,7 +813,8 @@ the timer when no buffers need to be checked."
;; Check if we should cancel the timer.
(when (and (not global-auto-revert-mode)
(null auto-revert-buffer-list))
(cancel-timer auto-revert-timer)
(if (timerp auto-revert-timer)
(cancel-timer auto-revert-timer))
(setq auto-revert-timer nil)))))
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