Add doom/recompile-packages (make compile:elpa)
If you upgrade (or downgrade) Emacs, there may be byte-compilation errors. This works around that.
This commit is contained in:
parent
5fe3cfbc75
commit
5346670ab0
2 changed files with 9 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -32,6 +32,9 @@ compile: init.el clean
|
||||||
compile\:core: init.el clean
|
compile\:core: init.el clean
|
||||||
@$(EMACS) -f doom/compile -- init.el core
|
@$(EMACS) -f doom/compile -- init.el core
|
||||||
|
|
||||||
|
compile\:elpa: init.el
|
||||||
|
@$(EMACS) -f doom/recompile-packages
|
||||||
|
|
||||||
$(patsubst %, compile\:%, $(MODULES)): init.el .local/autoloads.el
|
$(patsubst %, compile\:%, $(MODULES)): init.el .local/autoloads.el
|
||||||
@rm -fv $(shell find $(patsubst compile:%, modules/%, $@) -type f -name '*.elc')
|
@rm -fv $(shell find $(patsubst compile:%, modules/%, $@) -type f -name '*.elc')
|
||||||
@$(EMACS) -f doom/compile -- $(patsubst compile:%, modules/%, $@)
|
@$(EMACS) -f doom/compile -- $(patsubst compile:%, modules/%, $@)
|
||||||
|
|
|
@ -632,6 +632,12 @@ If ONLY-RECOMPILE-P is non-nil, only recompile out-of-date files."
|
||||||
;; Forcibly recompile core.el in case `load-path' has changed
|
;; Forcibly recompile core.el in case `load-path' has changed
|
||||||
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t))
|
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t))
|
||||||
|
|
||||||
|
(defun doom/recompile-packages ()
|
||||||
|
"Recompile all installed elpa packages. If you're getting odd errors after
|
||||||
|
upgrading Emacs, this may fix it."
|
||||||
|
(interactive)
|
||||||
|
(byte-recompile-directory package-user-dir 0 t))
|
||||||
|
|
||||||
(defun doom/reset ()
|
(defun doom/reset ()
|
||||||
"Clear the local cache completely (in `doom-cache-dir').
|
"Clear the local cache completely (in `doom-cache-dir').
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue