summaryrefslogtreecommitdiff
path: root/lisp/vc-mcvs.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-05-13 13:52:45 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-05-13 13:52:45 +0000
commit0a21309703b43caebd30d710b3567e114efeefe5 (patch)
tree69c15621e6a613c1f2c51253a2ca3a84bff23cdb /lisp/vc-mcvs.el
parentb251dc96fb86320cf1c7bfe6fe92eb41723d7e49 (diff)
downloademacs-0a21309703b43caebd30d710b3567e114efeefe5.tar.gz
(vc-mcvs-registered, vc-mcvs-root): Check if file-name-directory returns nil.
Diffstat (limited to 'lisp/vc-mcvs.el')
-rw-r--r--lisp/vc-mcvs.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el
index 9f204bfc046..1f59f5f3280 100644
--- a/lisp/vc-mcvs.el
+++ b/lisp/vc-mcvs.el
@@ -116,14 +116,16 @@ This is only meaningful if you don't use the implicit checkout model
;;;###autoload (defun vc-mcvs-registered (file)
;;;###autoload (let ((dir file))
;;;###autoload (while (and (stringp dir)
-;;;###autoload (not (equal dir (setq dir (file-name-directory dir)))))
+;;;###autoload (not (equal
+;;;###autoload dir (setq dir (file-name-directory dir))))
+;;;###autoload dir)
;;;###autoload (setq dir (if (file-directory-p
-;;;###autoload (expand-file-name "MCVS/CVS" dir))
-;;;###autoload t (directory-file-name dir))))
+;;;###autoload (expand-file-name "MCVS/CVS" dir))
+;;;###autoload t (directory-file-name dir))))
;;;###autoload (if (eq dir t)
-;;;###autoload (progn
-;;;###autoload (load "vc-mcvs")
-;;;###autoload (vc-mcvs-registered file)))))
+;;;###autoload (progn
+;;;###autoload (load "vc-mcvs")
+;;;###autoload (vc-mcvs-registered file)))))
(defun vc-mcvs-root (file)
"Return the root directory of a Meta-CVS project, if any."
@@ -132,7 +134,8 @@ This is only meaningful if you don't use the implicit checkout model
file 'mcvs-root
(let ((root nil))
(while (not (or root
- (equal file (setq file (file-name-directory file)))))
+ (equal file (setq file (file-name-directory file)))
+ (null file)))
(if (file-directory-p (expand-file-name "MCVS/CVS" file))
(setq root file)
(setq file (directory-file-name file))))