Fix doom-files-in returning files in arbitrary order
This would cause compilation issues in doom//byte-compile because prerequisite files weren't compiled before dependent ones.
This commit is contained in:
parent
75e6ea6bee
commit
6b1e1a2c58
1 changed files with 4 additions and 3 deletions
|
@ -105,6 +105,7 @@ This is used by `associate!', `file-exists-p!' and `project-file-exists-p!'."
|
|||
filter
|
||||
map
|
||||
full
|
||||
nosort
|
||||
(follow-symlinks t)
|
||||
(type 'files)
|
||||
(relative-to (unless full default-directory))
|
||||
|
@ -137,10 +138,10 @@ MATCH is a string regexp. Only entries that match it will be included."
|
|||
nconc (apply #'doom-files-in path (plist-put rest :relative-to relative-to))))
|
||||
((let ((path path-or-paths)
|
||||
result)
|
||||
(dolist (file (file-name-all-completions "" path))
|
||||
(unless (member file '("./" "../"))
|
||||
(dolist (file (directory-files path nil "." nosort))
|
||||
(unless (member file '("." ".."))
|
||||
(let ((fullpath (expand-file-name file path)))
|
||||
(cond ((directory-name-p fullpath)
|
||||
(cond ((file-directory-p fullpath)
|
||||
(when (and (memq type '(t dirs))
|
||||
(string-match-p match file)
|
||||
(not (and filter (funcall filter fullpath)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue