1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Add new customization option use-package-always-demand

This is equivalent to adding `:demand t` to all `use-package` declarations,
and has the same semantics as doing so (meaning it can be overridden locally
using `:defer t` in a declaration).

Fixes https://github.com/jwiegley/use-package/issues/423
This commit is contained in:
John Wiegley 2016-12-22 09:02:52 -08:00
parent dbf46d97be
commit ad8094c22d

View File

@ -80,6 +80,11 @@ The check is performed by looking for the module using `locate-library'."
:type 'boolean :type 'boolean
:group 'use-package) :group 'use-package)
(defcustom use-package-always-demand nil
"If non-nil, assume `:demand t` unless `:defer t` is given."
:type 'boolean
:group 'use-package)
(defcustom use-package-always-ensure nil (defcustom use-package-always-ensure nil
"Treat every package as though it had specified `:ensure SEXP`." "Treat every package as though it had specified `:ensure SEXP`."
:type 'sexp :type 'sexp
@ -1171,7 +1176,10 @@ this file. Usage:
(let ((body (let ((body
(macroexp-progn (macroexp-progn
(use-package-process-keywords name args* (use-package-process-keywords name
(if use-package-always-demand
(append args* '(:demand t))
args*)
(and use-package-always-defer (list :deferred t)))))) (and use-package-always-defer (list :deferred t))))))
(if use-package-debug (if use-package-debug
(display-buffer (display-buffer