emacs/lisp/use-package
Justin Burkett 59d34cf9ce Move :init forms before :after and :demand
The docstring of use-package says that :init should run before the
package is loaded but using :after moves the require statement ahead of
:init when any package specified in :after is already loaded. In the
following example, in the first case bar-x might get set before or after
bar is loaded depending on if foo is already loaded at the time, while
the second case always sets bar-x first.

(use-package bar
  :after (foo)
  :init (setq bar-x 2)
  :config (bar-mode))

(use-package bar
  :init (setq bar-x 2)
  :config (bar-mode))

This commit fixes the issue and makes sure that bar-x is set before bar
is loaded by use-package. Fixes https://github.com/jwiegley/use-package/issues/352.
2016-06-23 10:01:33 -04:00
..
bind-key.el :map no longer accepts lists; only eval-after-load if necessary 2016-02-27 00:48:29 -08:00
use-package.el Move :init forms before :after and :demand 2016-06-23 10:01:33 -04:00