]> git.eshelyaron.com Git - emacs.git/commitdiff
vc-resynch-window: Check whether auto-revert-mode is bound
authorSean Whitton <spwhitton@spwhitton.name>
Tue, 15 Jul 2025 09:18:52 +0000 (10:18 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:53:35 +0000 (10:53 +0200)
* lisp/vc/vc-dispatcher.el (auto-revert-mode): Delete
declaration.
(vc-resynch-window): Check whether auto-revert-mode is bound.

(cherry picked from commit e4ea991ed9a147ee44c85d2d512b47032e5cc4b3)

lisp/vc/vc-dispatcher.el

index d16e2fbb8d97e630ea0622d9beef0e853dc2649c..48ac8a116828e98852c877e6d650f200c22d2bdd 100644 (file)
@@ -679,7 +679,6 @@ ARG and NO-CONFIRM are passed on to `revert-buffer'."
 
 (defvar view-old-buffer-read-only)
 
-(defvar auto-revert-mode)
 (declare-function auto-revert-buffers "autorevert")
 
 (defun vc-resynch-window (file &optional keep noquery reset-vc-info)
@@ -703,7 +702,7 @@ editing!"
               ;; `global-auto-revert-mode' or `vc-auto-revert-mode')
               ;; then defer to that.  Otherwise we do our own
               ;; VC-specific reverting.
-              (if (and auto-revert-mode noquery)
+              (if (and (bound-and-true-p auto-revert-mode) noquery)
                   (auto-revert-buffers)
                (vc-revert-buffer-internal t noquery))