summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-src.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-04-14 16:51:39 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-16 16:24:53 +0200
commitd53c999b4ad7bc1f730875ae3d1af9d11895807c (patch)
treefc24b03036db60dd2034976d2e47fe82cefc1c16 /lisp/vc/vc-src.el
parentdc3d1628ecd7c0090c07480606e921a1f8f348a9 (diff)
downloademacs-d53c999b4ad7bc1f730875ae3d1af9d11895807c.tar.gz
emacs-d53c999b4ad7bc1f730875ae3d1af9d11895807c.tar.bz2
emacs-d53c999b4ad7bc1f730875ae3d1af9d11895807c.zip
Further vcs-cvs/rcs-responsible-p updates from master
* lisp/vc/vc-bzr.el (vc-bzr-responsible-p): * lisp/vc/vc-sccs.el (vc-sccs-responsible-p): * lisp/vc/vc-dav.el (vc-dav-responsible-p): Update doc string. * lisp/vc/vc-rcs.el (vc-rcs-responsible-p): * lisp/vc/vc-cvs.el (vc-cvs-responsible-p): Further fixes from master. * lisp/vc/vc-src.el (vc-src-responsible-p): Return the directory. * lisp/vc/vc.el: Update comments.
Diffstat (limited to 'lisp/vc/vc-src.el')
-rw-r--r--lisp/vc/vc-src.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 1c1a7b5d139..5a252c55cb2 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -242,11 +242,13 @@ This function differs from vc-do-command in that it invokes `vc-src-program'."
(vc-src-command nil files "add"))
(defun vc-src-responsible-p (file)
- "Return non-nil if SRC thinks it would be responsible for registering FILE."
- (file-directory-p (expand-file-name ".src"
- (if (file-directory-p file)
- file
- (file-name-directory file)))))
+ "Return the directory if SRC thinks it would be responsible for FILE."
+ (let ((dir (expand-file-name ".src"
+ (if (file-directory-p file)
+ file
+ (file-name-directory file)))))
+ (and (file-directory-p dir)
+ dir)))
(defun vc-src-checkin (files comment &optional _rev)
"SRC-specific version of `vc-backend-checkin'.