mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Macroexpand quoted eval-after-load block early
The main `use-package' macro incorrectly planted code containing a call to the `with-elapsed-timer' macro in a quoted block to be run by `eval-after-load'. If package use-package was not loaded at runtime, the block would error saying correctly that `with-elapsed-timer' is undefined. This mod correctly macroexpands the block at code generation time.
This commit is contained in:
parent
fbead83731
commit
593f18aff5
1 changed files with 6 additions and 4 deletions
|
@ -461,10 +461,12 @@
|
||||||
,init-body
|
,init-body
|
||||||
,(unless (null config-body)
|
,(unless (null config-body)
|
||||||
`(eval-after-load ,name-string
|
`(eval-after-load ,name-string
|
||||||
'(if ,requires-test
|
(quote
|
||||||
(with-elapsed-timer
|
(if ,requires-test
|
||||||
,(format "Configuring package %s" name-string)
|
,(macroexpand-all
|
||||||
,config-body))))
|
`(with-elapsed-timer
|
||||||
|
,(format "Configuring package %s" name-string)
|
||||||
|
,config-body))))))
|
||||||
t))
|
t))
|
||||||
`(if (and ,(or predicate t)
|
`(if (and ,(or predicate t)
|
||||||
,requires-test)
|
,requires-test)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue