diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-01-02 08:13:04 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-01-02 08:13:04 -0800 |
commit | 0877d0dc24ee792b9b14592869ea1aa0934aee58 (patch) | |
tree | 08e9265a1dd95974dc72622a9bef194682c0c716 /lisp/files.el | |
parent | aca3d51dfa45794fa68a2ffb6269e34fcee2ec6c (diff) | |
parent | d8fb8cce84b923a3289b69549e30958710ac3ebb (diff) | |
download | emacs-0877d0dc24ee792b9b14592869ea1aa0934aee58.tar.gz |
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/files.el b/lisp/files.el index e8be1a09047..6a2945cbc79 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,6 +1,6 @@ ;;; files.el --- file input and output commands for Emacs -;; Copyright (C) 1985-1987, 1992-2012 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992-2013 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Package: emacs @@ -660,11 +660,14 @@ Not actually set up until the first time you use it.") "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." |