From 4cddca3070934602b0156a5cc260c633f210599c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 31 Dec 2012 13:20:07 -0800 Subject: * files.el (parse-colon-path): Return nil for empty path elements. Fixes: debbugs:13296 --- lisp/files.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp/files.el') 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.") "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." -- cgit v1.2.1 From ab422c4d6899b1442cb6954c1829c1fb656b006c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 1 Jan 2013 09:11:05 +0000 Subject: Update copyright notices for 2013. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/files.el') diff --git a/lisp/files.el b/lisp/files.el index 301653abfb9..4aa913a4268 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 -- cgit v1.2.1