From cc5077a08757a8f85242676f1ffb6c2025403fa2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 15 Jul 2025 10:18:52 +0100 Subject: [PATCH] vc-resynch-window: Check whether auto-revert-mode is bound * 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index d16e2fbb8d9..48ac8a11682 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -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)) -- 2.39.5