From 0239ee227a5d40a13430843f61eea4f57afc2c7e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 4 Dec 2017 09:03:13 -0800 Subject: [PATCH] Move :init back to happening after all autoloads have occurred Fixes https://github.com/jwiegley/use-package/issues/535 --- up-core.el | 2 +- up-tests.el | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/up-core.el b/up-core.el index d809970cdb7..b78c619c003 100644 --- a/up-core.el +++ b/up-core.el @@ -66,7 +66,6 @@ :after :custom :custom-face - :init :bind :bind* :bind-keymap @@ -79,6 +78,7 @@ ;; Any other keyword that also declares commands to be autoloaded (such as ;; :bind) must appear before this keyword. :commands + :init :defer :demand :load diff --git a/up-tests.el b/up-tests.el index 8de058c4512..33b43654313 100644 --- a/up-tests.el +++ b/up-tests.el @@ -662,6 +662,15 @@ (eval-when-compile (declare-function quux "foo")))))) +(ert-deftest use-package-test/:commands-4 () + (match-expansion + (use-package foo :commands bar :init (bar)) + `(progn + (unless + (fboundp 'bar) + (autoload #'bar "foo" nil t)) + (bar)))) + (ert-deftest use-package-test/:defines-1 () (match-expansion (use-package foo :defines bar) -- 2.39.2