summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-sccs.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/vc-sccs.el')
-rw-r--r--lisp/vc/vc-sccs.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 92cce5f13a8..4b56fbf28ef 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -191,7 +191,7 @@ Optional string REV is a revision."
(autoload 'vc-switches "vc")
(defun vc-sccs-register (files &optional comment)
- "Register FILES into the SCCS version-control system.
+ "Register FILES into the SCCS version control system.
Automatically retrieve a read-only version of the files with keywords expanded.
COMMENT can be used to provide an initial description of FILES.
Passes either `vc-sccs-register-switches' or `vc-register-switches'
@@ -214,9 +214,13 @@ to the SCCS command."
(defun vc-sccs-responsible-p (file)
"Return non-nil if SCCS thinks it would be responsible for registering FILE."
;; TODO: check for all the patterns in vc-sccs-master-templates
- (or (file-directory-p (expand-file-name "SCCS" (file-name-directory file)))
- (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "")
- (file-name-nondirectory file)))))
+ (or (and (file-directory-p
+ (expand-file-name "SCCS" (file-name-directory file)))
+ (file-name-directory file))
+ (let ((dir (vc-sccs-search-project-dir (or (file-name-directory file) "")
+ (file-name-nondirectory file))))
+ (and (stringp dir)
+ dir))))
(defun vc-sccs-checkin (files comment &optional rev)
"SCCS-specific version of `vc-backend-checkin'."
@@ -270,8 +274,8 @@ locked. REV is the revision to check out."
(message "Checking out %s...done" file))))
(defun vc-sccs-revert (file &optional _contents-done)
- "Revert FILE to the version it was based on. If FILE is a directory,
-revert all subfiles."
+ "Revert FILE to the version it was based on.
+If FILE is a directory, revert all subfiles."
(if (file-directory-p file)
(mapc #'vc-sccs-revert (vc-expand-dirs (list file) 'SCCS))
(vc-sccs-do-command nil 0 "unget" (vc-master-name file))