[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111109: * files.el (parse-colon-p
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111109: * files.el (parse-colon-path): Return nil for empty path elements. |
Date: |
Mon, 31 Dec 2012 13:20:07 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111109
fixes bug: http://debbugs.gnu.org/13296
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-12-31 13:20:07 -0800
message:
* files.el (parse-colon-path): Return nil for empty path elements.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-31 20:58:57 +0000
+++ b/lisp/ChangeLog 2012-12-31 21:20:07 +0000
@@ -1,3 +1,8 @@
+2012-12-31 Glenn Morris <address@hidden>
+
+ * files.el (parse-colon-path): Doc fix. (Bug#12351)
+ Return nil for empty path elements. (Bug#13296)
+
2012-12-31 Fabián Ezequiel Gallina <address@hidden>
* progmodes/python.el (python-nav-end-of-statement): Rewrite in
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2012-12-01 15:45:38 +0000
+++ b/lisp/files.el 2012-12-31 21:20:07 +0000
@@ -660,11 +660,14 @@
"Explode a search path into a list of directory names.
Directories are separated by `path-separator' (which is colon in
GNU and Unix systems). Substitute environment variables into the
-resulting list of directory names."
+resulting list of directory names. For an empty path element (i.e.,
+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)
- (substitute-in-file-name (file-name-as-directory f)))
- (split-string search-path path-separator t))))
+ (if (equal "" f) nil
+ (substitute-in-file-name (file-name-as-directory f))))
+ (split-string search-path path-separator))))
(defun cd-absolute (dir)
"Change current directory to given absolute file name DIR."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111109: * files.el (parse-colon-path): Return nil for empty path elements.,
Glenn Morris <=