diff options
Diffstat (limited to 'lisp/vc/vc.el')
| -rw-r--r-- | lisp/vc/vc.el | 10 |
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 | ||
| 970 | If FILE is already registered, return the | 970 | If FILE is already registered, return the |
| @@ -974,7 +974,10 @@ responsible for FILE is returned. | |||
| 974 | 974 | ||
| 975 | Note that if FILE is a symbolic link, it will not be resolved -- | 975 | Note that if FILE is a symbolic link, it will not be resolved -- |
| 976 | the responsible backend system for the symbolic link itself will | 976 | the responsible backend system for the symbolic link itself will |
| 977 | be reported." | 977 | be reported. |
| 978 | |||
| 979 | If NO-ERROR is nil, signal an error that no VC backend is | ||
| 980 | responsible 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. |