Don't auto-defer if the package itself was given to :load

Otherwise, we'd be senselessly waiting for the package to load.
This commit is contained in:
John Wiegley 2017-12-05 15:47:53 -08:00
parent 2a9904b9e8
commit 3343cca33b
2 changed files with 25 additions and 0 deletions

View file

@ -552,6 +552,10 @@ extending any keys already present."
;; Certain keywords imply :defer, if :demand was not specified.
(when (and (not (plist-member args :demand))
(not (plist-member args :defer))
(not (or (equal '(t) (plist-get args :load))
(equal (list (use-package-as-string name))
(mapcar #'use-package-as-string
(plist-get args :load)))))
(cl-some #'identity
(mapcar (apply-partially #'plist-member args)
use-package-deferring-keywords)))