aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-12-31 13:20:07 -0800
committerGlenn Morris2012-12-31 13:20:07 -0800
commit4cddca3070934602b0156a5cc260c633f210599c (patch)
tree5e6db408dba0bb3fac928b5c066fff3c564edc26
parent6861432ebdc503bbf0f8886679d169c16060626b (diff)
downloademacs-4cddca3070934602b0156a5cc260c633f210599c.tar.gz
emacs-4cddca3070934602b0156a5cc260c633f210599c.zip
* files.el (parse-colon-path): Return nil for empty path elements.
Fixes: debbugs:13296
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el9
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a62a9cdb188..2a7fc8f7fd4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-12-31 Glenn Morris <rgm@gnu.org>
2
3 * files.el (parse-colon-path): Doc fix. (Bug#12351)
4 Return nil for empty path elements. (Bug#13296)
5
12012-12-31 Fabián Ezequiel Gallina <fgallina@cuca> 62012-12-31 Fabián Ezequiel Gallina <fgallina@cuca>
2 7
3 * progmodes/python.el (python-nav-end-of-statement): Rewrite in 8 * progmodes/python.el (python-nav-end-of-statement): Rewrite in
diff --git a/lisp/files.el b/lisp/files.el
index 62ad96cf28c..301653abfb9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -660,11 +660,14 @@ Not actually set up until the first time you use it.")
660 "Explode a search path into a list of directory names. 660 "Explode a search path into a list of directory names.
661Directories are separated by `path-separator' (which is colon in 661Directories are separated by `path-separator' (which is colon in
662GNU and Unix systems). Substitute environment variables into the 662GNU and Unix systems). Substitute environment variables into the
663resulting list of directory names." 663resulting list of directory names. For an empty path element (i.e.,
664a leading or trailing separator, or two adjacent separators), return
665nil (meaning `default-directory') as the associated list element."
664 (when (stringp search-path) 666 (when (stringp search-path)
665 (mapcar (lambda (f) 667 (mapcar (lambda (f)
666 (substitute-in-file-name (file-name-as-directory f))) 668 (if (equal "" f) nil
667 (split-string search-path path-separator t)))) 669 (substitute-in-file-name (file-name-as-directory f))))
670 (split-string search-path path-separator))))
668 671
669(defun cd-absolute (dir) 672(defun cd-absolute (dir)
670 "Change current directory to given absolute file name DIR." 673 "Change current directory to given absolute file name DIR."