aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
authorTassilo Horn2020-06-11 17:02:02 +0200
committerTassilo Horn2020-06-17 18:53:13 +0200
commit6dd702a7b62a26f9aeefd045cc99ff6ed0882ec9 (patch)
treef6f22691503a0023647c6aac162de838920e8ab6 /lisp/vc/vc.el
parent9682aa2f2493c89af1894ad2d52543d57f4958a5 (diff)
downloademacs-6dd702a7b62a26f9aeefd045cc99ff6ed0882ec9.tar.gz
emacs-6dd702a7b62a26f9aeefd045cc99ff6ed0882ec9.zip
bug-reference-setupfeature/bug-reference-setup
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index ce947d21f95..9b12d449785 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -964,7 +964,7 @@ use."
964 (throw 'found bk)))) 964 (throw 'found bk))))
965 965
966;;;###autoload 966;;;###autoload
967(defun vc-responsible-backend (file) 967(defun vc-responsible-backend (file &optional no-error)
968 "Return the name of a backend system that is responsible for FILE. 968 "Return the name of a backend system that is responsible for FILE.
969 969
970If FILE is already registered, return the 970If FILE is already registered, return the
@@ -974,7 +974,10 @@ responsible for FILE is returned.
974 974
975Note that if FILE is a symbolic link, it will not be resolved -- 975Note that if FILE is a symbolic link, it will not be resolved --
976the responsible backend system for the symbolic link itself will 976the responsible backend system for the symbolic link itself will
977be reported." 977be reported.
978
979If NO-ERROR is nil, signal an error that no VC backend is
980responsible for the given file."
978 (or (and (not (file-directory-p file)) (vc-backend file)) 981 (or (and (not (file-directory-p file)) (vc-backend file))
979 (catch 'found 982 (catch 'found
980 ;; First try: find a responsible backend. If this is for registration, 983 ;; First try: find a responsible backend. If this is for registration,
@@ -982,7 +985,8 @@ be reported."
982 (dolist (backend vc-handled-backends) 985 (dolist (backend vc-handled-backends)
983 (and (vc-call-backend backend 'responsible-p file) 986 (and (vc-call-backend backend 'responsible-p file)
984 (throw 'found backend)))) 987 (throw 'found backend))))
985 (error "No VC backend is responsible for %s" file))) 988 (unless no-error
989 (error "No VC backend is responsible for %s" file))))
986 990
987(defun vc-expand-dirs (file-or-dir-list backend) 991(defun vc-expand-dirs (file-or-dir-list backend)
988 "Expands directories in a file list specification. 992 "Expands directories in a file list specification.