diff options
author | John Wiegley <johnw@newartisans.com> | 2017-12-01 00:44:49 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2017-12-01 00:44:49 -0800 |
commit | 669e8527fb28d51dc0b12ab0dfa2c749ab549fec (patch) | |
tree | ddc42152d7872f275826e5f211d57f1d527b8354 /lisp/use-package/use-package.el | |
parent | af8b961716e4338b779a916b5ea203fc4ba63309 (diff) | |
download | emacs-669e8527fb28d51dc0b12ab0dfa2c749ab549fec.tar.gz emacs-669e8527fb28d51dc0b12ab0dfa2c749ab549fec.tar.bz2 emacs-669e8527fb28d51dc0b12ab0dfa2c749ab549fec.zip |
Sort keywords at the appropriate time
Diffstat (limited to 'lisp/use-package/use-package.el')
-rw-r--r-- | lisp/use-package/use-package.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 0983500e3a9..2ab0135e753 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -1741,11 +1741,10 @@ this file. Usage: (orig-args args) (args (use-package-normalize-plist name args))) (dolist (spec use-package-defaults) - (setq args (use-package-sort-keywords - (if (eval (nth 2 spec)) - (use-package-plist-maybe-put - args (nth 0 spec) (eval (nth 1 spec))) - args)))) + (setq args (if (eval (nth 2 spec)) + (use-package-plist-maybe-put + args (nth 0 spec) (eval (nth 1 spec))) + args))) ;; When byte-compiling, pre-load the package so all its symbols are in ;; scope. @@ -1769,10 +1768,12 @@ this file. Usage: (let ((body (macroexp-progn (use-package-process-keywords name - (let ((args* (if (and use-package-always-demand - (not (memq :defer args))) - (append args '(:demand t)) - args))) + (let ((args* + (use-package-sort-keywords + (if (and use-package-always-demand + (not (memq :defer args))) + (plist-put args :demand t) + args)))) (when (and use-package-always-ensure (plist-member args* :load-path) (not (plist-member orig-args :ensure))) |