From: Phil Hudson Date: Wed, 23 Jan 2013 20:33:15 +0000 (+0000) Subject: Macroexpand quoted eval-after-load block early X-Git-Tag: emacs-29.0.90~1306^2~15^2~464^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=593f18aff56e8a9f492143c4a397fba0840816b2;p=emacs.git 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. --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index f9bc5c2b32e..53c96ae1f6c 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -461,10 +461,12 @@ ,init-body ,(unless (null config-body) `(eval-after-load ,name-string - '(if ,requires-test - (with-elapsed-timer - ,(format "Configuring package %s" name-string) - ,config-body)))) + (quote + (if ,requires-test + ,(macroexpand-all + `(with-elapsed-timer + ,(format "Configuring package %s" name-string) + ,config-body)))))) t)) `(if (and ,(or predicate t) ,requires-test)