Add a :demand directive, to override deferred loading ()

GitHub-reference: https://github.com/jwiegley/use-package/issues/65
This commit is contained in:
John Wiegley 2013-12-04 19:44:09 -06:00
parent 9d395a4019
commit c3704ac36e

View file

@ -345,6 +345,7 @@
:config
:defer
:defines
:demand
:diminish
:disabled
:ensure
@ -401,6 +402,7 @@ For full documentation. please see commentary.
:interpreter Form to be added to `interpreter-mode-alist'.
:defer Defer loading of package -- automatic
if :commands, :bind, :mode or :interpreter are used.
:demand Prevent deferred loading in all cases.
:config Runs if and when package loads.
:if Conditional loading.
:disabled Ignore everything.
@ -539,7 +541,8 @@ For full documentation. please see commentary.
`(load ,name t)
`(require ',name nil t))))
,(if (or commands (plist-get args :defer))
,(if (and (or commands (plist-get args :defer))
(not (plist-get args :demand)))
(let (form)
(mapc #'(lambda (command)
(push `(autoload (function ,command)