summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2017-12-04 09:03:13 -0800
committerJohn Wiegley <johnw@newartisans.com>2017-12-04 09:11:35 -0800
commit0239ee227a5d40a13430843f61eea4f57afc2c7e (patch)
tree8da7eb178b1ce55f99b3d4593c32875fa1f601f2
parent5d9c854a6cf12fff2326ee5653e87e2d3d550a8d (diff)
downloademacs-0239ee227a.tar.gz
Move :init back to happening after all autoloads have occurred
Fixes https://github.com/jwiegley/use-package/issues/535
-rw-r--r--up-core.el2
-rw-r--r--up-tests.el9
2 files changed, 10 insertions, 1 deletions
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)