[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110048: * files.el (parse-colon-path
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110048: * files.el (parse-colon-path): Use split-string. |
Date: |
Sun, 16 Sep 2012 23:57:28 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110048
fixes bug: http://debbugs.gnu.org/12351
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-09-16 23:57:28 +0800
message:
* files.el (parse-colon-path): Use split-string.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-16 04:52:38 +0000
+++ b/lisp/ChangeLog 2012-09-16 15:57:28 +0000
@@ -1,5 +1,7 @@
2012-09-16 Chong Yidong <address@hidden>
+ * files.el (parse-colon-path): Use split-string (Bug#12351).
+
* window.el (special-display-popup-frame): Doc fix (Bug#8853).
(display-buffer-function): Mark as obsolete.
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2012-09-09 05:50:43 +0000
+++ b/lisp/files.el 2012-09-16 15:57:28 +0000
@@ -658,22 +658,13 @@
(defun parse-colon-path (search-path)
"Explode a search path into a list of directory names.
-Directories are separated by occurrences of `path-separator'
-\(which is colon in GNU and GNU-like systems)."
- ;; We could use split-string here.
- (and search-path
- (let (cd-list (cd-start 0) cd-colon)
- (setq search-path (concat search-path path-separator))
- (while (setq cd-colon (string-match path-separator search-path
cd-start))
- (setq cd-list
- (nconc cd-list
- (list (if (= cd-start cd-colon)
- nil
- (substitute-in-file-name
- (file-name-as-directory
- (substring search-path cd-start
cd-colon)))))))
- (setq cd-start (+ cd-colon 1)))
- cd-list)))
+Directories are separated by `path-separator' (which is colon in
+GNU and Unix systems). Substitute environment variables into the
+resulting list of directory names."
+ (when (stringp search-path)
+ (mapcar (lambda (f)
+ (substitute-in-file-name (file-name-as-directory f)))
+ (split-string search-path path-separator t))))
(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/trunk r110048: * files.el (parse-colon-path): Use split-string.,
Chong Yidong <=