]> git.eshelyaron.com Git - emacs.git/commitdiff
Move :init back to happening after all autoloads have occurred
authorJohn Wiegley <johnw@newartisans.com>
Mon, 4 Dec 2017 17:03:13 +0000 (09:03 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 4 Dec 2017 17:03:13 +0000 (09:03 -0800)
Fixes https://github.com/jwiegley/use-package/issues/535

up-core.el
up-tests.el

index d809970cdb733d0bdc02845717eb469a6257e9c0..b78c619c003336eb6aea3ab28ec21276745aba75 100644 (file)
@@ -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
index 8de058c4512a80a70d0cb76e40666d1a21db93c7..33b4365431353be465ac399588dc38f2dd340c9e 100644 (file)
         (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)