core-packages: rewrite doom/byte-compile (more feedback + remove comprehensive-p)
This commit is contained in:
parent
1840ccec81
commit
6f9adb442a
1 changed files with 18 additions and 11 deletions
|
@ -305,19 +305,26 @@ packages. This will delete old versions of packages as well."
|
|||
(when quelpa-modified-p
|
||||
(quelpa-save-cache))))))
|
||||
|
||||
(defun doom/byte-compile (&optional comprehensive-p)
|
||||
"Byte (re)compile the important files in your emacs configuration (init.el and
|
||||
core/*.el). If COMPREHENSIVE-P is non-nil, also compile config.el files in
|
||||
modules. DOOM Emacs was designed to benefit a lot from this."
|
||||
(defun doom/byte-compile ()
|
||||
"Byte (re)compile the important files in your emacs configuration (i.e.
|
||||
init.el, core/*.el and modules/*/*/config.el) DOOM Emacs was designed to benefit
|
||||
a lot from this."
|
||||
(interactive)
|
||||
(let (use-package-always-ensure
|
||||
(doom-initialize)
|
||||
(let ((targets (append (list (f-expand "init.el" doom-emacs-dir)
|
||||
(f-expand "core.el" doom-core-dir))
|
||||
(reverse (f-glob "core-*.el" doom-core-dir))
|
||||
(-filter 'f-exists-p
|
||||
(--map (doom-module-path (car it) (cdr it) "config.el")
|
||||
doom-modules))))
|
||||
use-package-always-ensure
|
||||
file-name-handler-alist)
|
||||
(mapc 'byte-compile-file
|
||||
(append (list (f-expand "init.el" doom-emacs-dir)
|
||||
(f-expand "core.el" doom-core-dir))
|
||||
(reverse (f-glob "core-*.el" doom-core-dir))
|
||||
(when comprehensive-p
|
||||
(f-glob "*/*/config.el" doom-modules-dir))))))
|
||||
(mapc 'byte-compile-file targets)
|
||||
(when noninteractive
|
||||
(when targets (message "\n"))
|
||||
(message "Compiled %s files:\n%s" (length targets)
|
||||
(mapconcat (lambda (file) (concat "+ " (f-relative file doom-emacs-dir)))
|
||||
targets "\n")))))
|
||||
|
||||
(defun doom/refresh-autoloads ()
|
||||
"Refreshes the autoloads.el file, which tells Emacs where to find all the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue