Improve predicate fn for byte-compile targets
Will now avoid dotfiles and unit test files.
This commit is contained in:
parent
6bd7b72281
commit
b5552eed39
1 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,12 @@ respectively.")
|
||||||
;;
|
;;
|
||||||
;; Helpers
|
;; Helpers
|
||||||
|
|
||||||
|
(defun doom--byte-compile-ignore-file-p (path)
|
||||||
|
(let ((filename (file-name-nondirectory path)))
|
||||||
|
(or (string-prefix-p "." filename)
|
||||||
|
(string-prefix-p "test-" filename)
|
||||||
|
(not (equal (file-name-extension path) "el")))))
|
||||||
|
|
||||||
(defun doom-byte-compile (&optional modules recompile-p)
|
(defun doom-byte-compile (&optional modules recompile-p)
|
||||||
"Byte compiles your emacs configuration.
|
"Byte compiles your emacs configuration.
|
||||||
|
|
||||||
|
@ -98,7 +104,7 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
|
||||||
;; Assemble el files we want to compile; taking into account that
|
;; Assemble el files we want to compile; taking into account that
|
||||||
;; MODULES may be a list of MODULE/SUBMODULE strings from the command
|
;; MODULES may be a list of MODULE/SUBMODULE strings from the command
|
||||||
;; line.
|
;; line.
|
||||||
(let ((target-files (doom-files-in targets :depth 1 :match "\\.el$"))
|
(let ((target-files (doom-files-in targets :filter #'doom--byte-compile-ignore-file-p))
|
||||||
(load-path load-path)
|
(load-path load-path)
|
||||||
kill-emacs-hook kill-buffer-query-functions)
|
kill-emacs-hook kill-buffer-query-functions)
|
||||||
(unless target-files
|
(unless target-files
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue