mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Improve predicate fn for byte-compile targets
Will now avoid dotfiles and unit test files.
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user