diff options
| author | Lars Magne Ingebrigtsen | 2015-01-16 01:12:40 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2015-01-16 01:12:52 +0100 |
| commit | 22294ae511509ad86586eb5d054c95de38e87894 (patch) | |
| tree | a4033ee2fa77a6518477e00b00697fe4ed7cfdcf | |
| parent | 2290000ed69b1157739c280f090e5b60112e83fe (diff) | |
| download | emacs-22294ae511509ad86586eb5d054c95de38e87894.tar.gz emacs-22294ae511509ad86586eb5d054c95de38e87894.zip | |
Minor directory-files-recursively touch-up
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 150f32f351a..7ef0e6a2749 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-01-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * files.el (directory-files-recursively): Don't use the word | ||
| 4 | "path" for a file name. | ||
| 5 | |||
| 1 | 2015-01-15 Wolfgang Jenkner <wjenkner@inode.at> | 6 | 2015-01-15 Wolfgang Jenkner <wjenkner@inode.at> |
| 2 | 7 | ||
| 3 | * calc/calc-units.el (math-units-in-expr-p) | 8 | * calc/calc-units.el (math-units-in-expr-p) |
diff --git a/lisp/files.el b/lisp/files.el index 175f85b29d0..f8318d8a34d 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -749,14 +749,15 @@ If INCLUDE-DIRECTORIES, also include directories that have matching names." | |||
| 749 | (unless (member file '("./" "../")) | 749 | (unless (member file '("./" "../")) |
| 750 | (if (directory-name-p file) | 750 | (if (directory-name-p file) |
| 751 | (let* ((leaf (substring file 0 (1- (length file)))) | 751 | (let* ((leaf (substring file 0 (1- (length file)))) |
| 752 | (path (expand-file-name leaf dir))) | 752 | (full-file (expand-file-name leaf dir))) |
| 753 | ;; Don't follow symlinks to other directories. | 753 | ;; Don't follow symlinks to other directories. |
| 754 | (unless (file-symlink-p path) | 754 | (unless (file-symlink-p full-file) |
| 755 | (setq result (nconc result (directory-files-recursively | 755 | (setq result |
| 756 | path match include-directories)))) | 756 | (nconc result (directory-files-recursively |
| 757 | full-file match include-directories)))) | ||
| 757 | (when (and include-directories | 758 | (when (and include-directories |
| 758 | (string-match match leaf)) | 759 | (string-match match leaf)) |
| 759 | (setq result (nconc result (list path))))) | 760 | (setq result (nconc result (list full-file))))) |
| 760 | (when (string-match match file) | 761 | (when (string-match match file) |
| 761 | (push (expand-file-name file dir) files))))) | 762 | (push (expand-file-name file dir) files))))) |
| 762 | (nconc result (nreverse files)))) | 763 | (nconc result (nreverse files)))) |