changeset 50963:575459cc44fb

(vc-mcvs-registered, vc-mcvs-root): Check if file-name-directory returns nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 13 May 2003 13:52:45 +0000
parents 8a38e6c7aa44
children d5b5bbb27b2f
files lisp/vc-mcvs.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-mcvs.el	Mon May 12 23:47:31 2003 +0000
+++ b/lisp/vc-mcvs.el	Tue May 13 13:52:45 2003 +0000
@@ -116,14 +116,16 @@
 ;;;###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 @@
        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))))