diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9e5a8be5e13..9caf8455af6 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -906,7 +906,7 @@ in the `project-current' call, the timeout is determined by (project--value-in-dir 'project-vc-ignores dir))) (defun project--vc-ignores (dir backend extra-ignores) - (require 'vc) + (require 'vc) ; Can be removed when we require Emacs 31.1. (append (when backend (delq diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index f3519465c07..72345990b2e 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -290,16 +290,18 @@ if that doesn't exist either, return nil." (require (intern (concat "vc-" (downcase (symbol-name backend))))) (if (fboundp f) f (let ((def (vc-make-backend-sym 'default fun))) + ;; Load vc.el, for default implementations, if needed. + (require 'vc) (if (fboundp def) (cons def backend) nil)))))) (defun vc-call-backend (backend function-name &rest args) - "Call for BACKEND the implementation of FUNCTION-NAME with the given ARGS. -Calls + "Call BACKEND's implementation of FUNCTION-NAME with arguments ARGS. +Does (apply #\\='vc-BACKEND-FUN ARGS) if vc-BACKEND-FUN exists (after trying to find it in vc-BACKEND.el) -and else calls +and otherwise does (apply #\\='vc-default-FUN BACKEND ARGS)