changeset 3038:4bdac10d920a

(cd): Set cd-path to a list.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 May 1993 21:45:20 +0000
parents 3c7a86dba45b
children 7520bbbe9100
files lisp/files.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon May 24 21:41:18 1993 +0000
+++ b/lisp/files.el	Mon May 24 21:45:20 1993 +0000
@@ -246,7 +246,10 @@
 	 (setq cd-path (concat cd-path ":"))
 	 (while (setq cd-colon (string-match ":" cd-path cd-start))
 	   (setq cd-list
-		 (nconc cd-list (list (substitute-in-file-name (file-name-as-directory (substring cd-path cd-start cd-colon))))))
+		 (nconc cd-list
+			(list (substitute-in-file-name
+			       (file-name-as-directory
+				(substring cd-path cd-start cd-colon))))))
 	   (setq cd-start (+ cd-colon 1)))
 	 cd-list)))
 
@@ -260,8 +263,7 @@
       (error "%s is not a directory" dir)
     (if (file-executable-p dir)
 	(setq default-directory dir)
-      (error "Cannot cd to %s:  Permission denied" dir)))
-)
+      (error "Cannot cd to %s:  Permission denied" dir))))
 
 (defun cd (dir)
   "Make DIR become the current buffer's default directory.
@@ -273,7 +275,7 @@
 	(cd-absolute (expand-file-name dir))
       (if (null cd-path)
 	  (let ((trypath (parse-colon-path (getenv "CDPATH"))))
-	    (setq cd-path (or trypath "./"))))
+	    (setq cd-path (or trypath (list "./")))))
       (if (not (catch 'found
 		 (mapcar
 		  (function (lambda (x)