Commit 22294ae5 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Minor directory-files-recursively touch-up

* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
parent 2290000e
2015-01-16 Lars Magne Ingebrigtsen <>
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
2015-01-15 Wolfgang Jenkner <>
* calc/calc-units.el (math-units-in-expr-p)
......@@ -749,14 +749,15 @@ If INCLUDE-DIRECTORIES, also include directories that have matching names."
(unless (member file '("./" "../"))
(if (directory-name-p file)
(let* ((leaf (substring file 0 (1- (length file))))
(path (expand-file-name leaf dir)))
(full-file (expand-file-name leaf dir)))
;; Don't follow symlinks to other directories.
(unless (file-symlink-p path)
(setq result (nconc result (directory-files-recursively
path match include-directories))))
(unless (file-symlink-p full-file)
(setq result
(nconc result (directory-files-recursively
full-file match include-directories))))
(when (and include-directories
(string-match match leaf))
(setq result (nconc result (list path)))))
(setq result (nconc result (list full-file)))))
(when (string-match match file)
(push (expand-file-name file dir) files)))))
(nconc result (nreverse files))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment