diff options
| author | Eli Zaretskii | 2019-03-09 12:51:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-03-09 12:51:33 +0200 |
| commit | 82d4b9872fe848db8645b4ed3c11944f28bcdb79 (patch) | |
| tree | 2725490aeee4c19fd343e6dc14e9676afafb322a | |
| parent | a3b193516f991ceaf79d33c6158dd7ef060c7bce (diff) | |
| download | emacs-82d4b9872fe848db8645b4ed3c11944f28bcdb79.tar.gz emacs-82d4b9872fe848db8645b4ed3c11944f28bcdb79.zip | |
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.
| -rw-r--r-- | lisp/autorevert.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index d1b8f94a8e2..242344fe9d1 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -813,7 +813,8 @@ the timer when no buffers need to be checked." | |||
| 813 | ;; Check if we should cancel the timer. | 813 | ;; Check if we should cancel the timer. |
| 814 | (when (and (not global-auto-revert-mode) | 814 | (when (and (not global-auto-revert-mode) |
| 815 | (null auto-revert-buffer-list)) | 815 | (null auto-revert-buffer-list)) |
| 816 | (cancel-timer auto-revert-timer) | 816 | (if (timerp auto-revert-timer) |
| 817 | (cancel-timer auto-revert-timer)) | ||
| 817 | (setq auto-revert-timer nil))))) | 818 | (setq auto-revert-timer nil))))) |
| 818 | 819 | ||
| 819 | 820 | ||