Subject: bug#21454: (no subject)

From: Tino Calancha <[email-masked]>
Date: Thu, 10 Sep 2015 21:48:31 +0900 (JST)

Previous patch renamed `parse-colon-path' with a different name. 
Attached the patch using the right name.

--- files.el	2015-09-10 19:31:06.569650962 +0900
+++ files_patched.el	2015-09-10 21:42:02.045650024 +0900
@@ -667,6 +667,7 @@
   "Value of the CDPATH environment variable, as a list.
 Not actually set up until the first time you use it.")
 
+(require 'env)
 (defun parse-colon-path (search-path)
   "Explode a search path into a list of directory names.
 Directories are separated by `path-separator' (which is colon in
@@ -675,10 +676,12 @@
 a leading or trailing separator, or two adjacent separators), return
 nil (meaning `default-directory') as the associated list element."
   (when (stringp search-path)
-    (mapcar (lambda (f)
-	      (if (equal "" f) nil
-		(substitute-in-file-name (file-name-as-directory f))))
-	    (split-string search-path path-separator))))
+    (let* ((path-list        (mapcar 'substitute-env-vars (split-string search-path path-separator)))
+           (search-path-sub  (mapconcat 'identity path-list path-separator)))
+      (mapcar (lambda (f)
+                (if (equal "" f) nil
+                  (expand-file-name (file-name-as-directory f))))
+              (split-string search-path-sub path-separator)))))
 
 (defun cd-absolute (dir)
   "Change current directory to given absolute file name DIR."