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
|
(when quelpa-modified-p
|
||||||
(quelpa-save-cache))))))
|
(quelpa-save-cache))))))
|
||||||
|
|
||||||
(defun doom/byte-compile (&optional comprehensive-p)
|
(defun doom/byte-compile ()
|
||||||
"Byte (re)compile the important files in your emacs configuration (init.el and
|
"Byte (re)compile the important files in your emacs configuration (i.e.
|
||||||
core/*.el). If COMPREHENSIVE-P is non-nil, also compile config.el files in
|
init.el, core/*.el and modules/*/*/config.el) DOOM Emacs was designed to benefit
|
||||||
modules. DOOM Emacs was designed to benefit a lot from this."
|
a lot from this."
|
||||||
(interactive)
|
(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)
|
file-name-handler-alist)
|
||||||
(mapc 'byte-compile-file
|
(mapc 'byte-compile-file targets)
|
||||||
(append (list (f-expand "init.el" doom-emacs-dir)
|
(when noninteractive
|
||||||
(f-expand "core.el" doom-core-dir))
|
(when targets (message "\n"))
|
||||||
(reverse (f-glob "core-*.el" doom-core-dir))
|
(message "Compiled %s files:\n%s" (length targets)
|
||||||
(when comprehensive-p
|
(mapconcat (lambda (file) (concat "+ " (f-relative file doom-emacs-dir)))
|
||||||
(f-glob "*/*/config.el" doom-modules-dir))))))
|
targets "\n")))))
|
||||||
|
|
||||||
(defun doom/refresh-autoloads ()
|
(defun doom/refresh-autoloads ()
|
||||||
"Refreshes the autoloads.el file, which tells Emacs where to find all the
|
"Refreshes the autoloads.el file, which tells Emacs where to find all the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue