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:
Phil Hudson 2013-01-23 20:33:15 +00:00
parent fbead83731
commit 593f18aff5

View file

@ -461,10 +461,12 @@
,init-body
,(unless (null config-body)
`(eval-after-load ,name-string
'(if ,requires-test
(with-elapsed-timer
(quote
(if ,requires-test
,(macroexpand-all
`(with-elapsed-timer
,(format "Configuring package %s" name-string)
,config-body))))
,config-body))))))
t))
`(if (and ,(or predicate t)
,requires-test)