From: Sean Whitton Date: Tue, 15 Jul 2025 09:18:52 +0000 (+0100) Subject: vc-resynch-window: Check whether auto-revert-mode is bound X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc5077a08757a8f85242676f1ffb6c2025403fa2;p=emacs.git 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) --- 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))