summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-02-24 23:02:59 +0000
committerGlenn Morris <rgm@gnu.org>2008-02-24 23:02:59 +0000
commit09607e62d90fa153114934f3312b80d9648b8c0e (patch)
tree05cf9029c7a5a7245d2d66d28aed87be634266b1 /lisp
parent967bf29791e9e75c343b072e3b1128ec5989fb15 (diff)
downloademacs-09607e62d90fa153114934f3312b80d9648b8c0e.tar.gz
emacs-09607e62d90fa153114934f3312b80d9648b8c0e.tar.bz2
emacs-09607e62d90fa153114934f3312b80d9648b8c0e.zip
(vc-rcs-register): Fix treatment of directories in multiple file case.
Use a single `let' rather than two.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc-rcs.el46
2 files changed, 27 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a92eb1b6f44..4dd56863948 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,9 @@
* vc-mcvs.el (vc-mcvs-register): Fix let-binding (for use of `file').
+ * vc-rcs.el (vc-rcs-register): Fix treatment of directories in
+ multiple file case. Use a single `let' rather than two.
+
2008-02-24 Dan Nicolaescu <dann@ics.uci.edu>
* progmodes/compile.el (compilation-start): Specify a face for
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index 0f2551d49a3..b20240b25b7 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -262,9 +262,11 @@ the RCS command (in that order).
Automatically retrieve a read-only version of the file with keywords
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
- (let ((subdir (expand-file-name "RCS" (file-name-directory file))))
+ (let (subdir name)
(dolist (file files)
- (and (not (file-exists-p subdir))
+ (and (not (file-exists-p
+ (setq subdir (expand-file-name "RCS"
+ (file-name-directory file)))))
(not (directory-files (file-name-directory file)
nil ".*,v$" t))
(yes-or-no-p "Create RCS subdirectory? ")
@@ -277,26 +279,26 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
(vc-switches 'RCS 'register))
;; parse output to find master file name and workfile version
(with-current-buffer "*vc*"
- (goto-char (point-min))
- (let ((name (if (looking-at (concat "^\\(.*\\) <-- "
- (file-name-nondirectory file)))
- (match-string 1))))
- (if (not name)
- ;; if we couldn't find the master name,
- ;; run vc-rcs-registered to get it
- ;; (will be stored into the vc-name property)
- (vc-rcs-registered file)
- (vc-file-setprop file 'vc-name
- (if (file-name-absolute-p name)
- name
- (expand-file-name
- name
- (file-name-directory file))))))
- (vc-file-setprop file 'vc-working-revision
- (if (re-search-forward
- "^initial revision: \\([0-9.]+\\).*\n"
- nil t)
- (match-string 1)))))))
+ (goto-char (point-min))
+ (if (not (setq name
+ (if (looking-at (concat "^\\(.*\\) <-- "
+ (file-name-nondirectory file)))
+ (match-string 1))))
+ ;; if we couldn't find the master name,
+ ;; run vc-rcs-registered to get it
+ ;; (will be stored into the vc-name property)
+ (vc-rcs-registered file)
+ (vc-file-setprop file 'vc-name
+ (if (file-name-absolute-p name)
+ name
+ (expand-file-name
+ name
+ (file-name-directory file))))))
+ (vc-file-setprop file 'vc-working-revision
+ (if (re-search-forward
+ "^initial revision: \\([0-9.]+\\).*\n"
+ nil t)
+ (match-string 1))))))
(defun vc-rcs-responsible-p (file)
"Return non-nil if RCS thinks it would be responsible for registering FILE."