From 593f18aff56e8a9f492143c4a397fba0840816b2 Mon Sep 17 00:00:00 2001 From: Phil Hudson Date: Wed, 23 Jan 2013 20:33:15 +0000 Subject: [PATCH] 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. --- lisp/use-package/use-package.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) -- 2.39.2