From: John Wiegley Date: Fri, 26 Feb 2016 01:04:17 +0000 (-0800) Subject: Add variable `use-package-always-defer' X-Git-Tag: emacs-29.0.90~1306^2~15^2~306 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6da4e0ce9d9841d64a07f991fc8de39149d3a737;p=emacs.git Add variable `use-package-always-defer' GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/202 --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 48611720a9c..45ef410be88 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -66,6 +66,11 @@ then the expanded macros do their job silently." :type 'boolean :group 'use-package) +(defcustom use-package-always-defer nil + "If non-nil, assume `:defer t` unless `:demand t` is given." + :type 'sexp + :group 'use-package) + (defcustom use-package-always-ensure nil "Treat every package as though it had specified `:ensure SEXP`." :type 'sexp @@ -1126,7 +1131,8 @@ this file. Usage: (let ((body (macroexp-progn - (use-package-process-keywords name args*)))) + (use-package-process-keywords name args* + (and use-package-always-defer '(:deferred t)))))) (if use-package-debug (display-buffer (save-current-buffer