doom-files-in: replace NOSORT w/ SORT; change default MATCH

- SORT defaults to t
- MATCH's new default regexp excludes files that start with underscore.
This commit is contained in:
Henrik Lissner 2019-06-16 15:27:49 +02:00
parent 39faabab6a
commit 5e9c020c21
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 23 additions and 18 deletions

View file

@ -108,7 +108,7 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
;; Assemble el files we want to compile; taking into account that
;; MODULES may be a list of MODULE/SUBMODULE strings from the command
;; line.
(let ((target-files (doom-files-in targets :filter #'doom--byte-compile-ignore-file-p)))
(let ((target-files (doom-files-in targets :filter #'doom--byte-compile-ignore-file-p :sort nil)))
(when (or (not modules)
(member ":core" modules))
(push (expand-file-name "init.el" doom-emacs-dir)
@ -175,10 +175,10 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
module. This does not include your byte-compiled, third party packages.'"
(cl-loop with default-directory = doom-emacs-dir
for path
in (append (doom-files-in doom-emacs-dir :match "\\.elc$" :depth 0)
(doom-files-in doom-private-dir :match "\\.elc$" :depth 1)
(doom-files-in doom-core-dir :match "\\.elc$")
(doom-files-in doom-modules-dirs :match "\\.elc$" :depth 4))
in (append (doom-files-in doom-emacs-dir :match "\\.elc$" :depth 0 :sort nil)
(doom-files-in doom-private-dir :match "\\.elc$" :depth 1 :sort nil)
(doom-files-in doom-core-dir :match "\\.elc$" :sort nil)
(doom-files-in doom-modules-dirs :match "\\.elc$" :depth 4 :sort nil))
for truepath = (file-truename path)
if (file-exists-p path)
do (delete-file path)