mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
vc-find-backend-function: Require vc for default implementations
* lisp/vc/vc-hooks.el (vc-find-backend-function): Require vc for default implementations (bug#80254). Report and fix due to Daniel Mendler <mail@daniel-mendler.de>.
This commit is contained in:
parent
805d76790d
commit
bc763572a9
2 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue