changeset:   4640:8cef85a39d2c
tag:         tip
user:        Aidan Kehoe <kehoea(a)parhasard.net>
date:        Sat Jun 06 17:20:21 2009 +0100
files:       lisp/ChangeLog lisp/files.el
description:
Make CDPATH handling portable, accept entries not matching "/$".
2009-06-06  Aidan Kehoe  <kehoea(a)parhasard.net>
	* files.el (cd):
	Make CDPATH handling portable, accept entries without trailing
	slashes within it. Some style corrections from Stephen Turnbull,
	thank you Stephen.
diff -r 7757334005ae -r 8cef85a39d2c lisp/ChangeLog
--- a/lisp/ChangeLog	Sat Jun 06 12:59:31 2009 +0100
+++ b/lisp/ChangeLog	Sat Jun 06 17:20:21 2009 +0100
@@ -1,3 +1,10 @@
+2009-06-06  Aidan Kehoe  <kehoea(a)parhasard.net>
+
+	* files.el (cd): 
+	Make CDPATH handling portable, accept entries without trailing
+	slashes within it. Some style corrections from Stephen Turnbull,
+	thank you Stephen. 
+
 2009-05-29  Aidan Kehoe  <kehoea(a)parhasard.net>
 
 	* bytecomp.el (byte-compile-lambda): 
diff -r 7757334005ae -r 8cef85a39d2c lisp/files.el
--- a/lisp/files.el	Sat Jun 06 12:59:31 2009 +0100
+++ b/lisp/files.el	Sat Jun 06 17:20:21 2009 +0100
@@ -595,12 +595,13 @@
 				   (null (getenv "CDPATH"))))))
   (if (file-name-absolute-p dir)
       (cd-absolute (expand-file-name dir))
-    ;; XEmacs
+    ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
+    ;; do under Windows.
     (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous))
-      ;;#### Unix-specific
-      (let ((trypath (parse-colon-path
-		      (setq cdpath-previous (getenv "CDPATH")))))
-	(setq cd-path (or trypath (list "./")))))
+      (let ((trypath (split-path (setq cdpath-previous (getenv "CDPATH")))))
+	(setq cd-path (or (and trypath 
+			       (mapcar #'file-name-as-directory trypath))
+                          (file-name-as-directory "")))))
     (or (catch 'found
 	  (mapcar #'(lambda (x)
 		        (let ((f (expand-file-name (concat x dir))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches