From: John Wiegley Date: Mon, 7 Oct 2013 21:28:30 +0000 (-0700) Subject: Merge pull request from phillord/first-keyword X-Git-Tag: emacs-29.0.90~1306^2~15^2~438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=901272a8c7f86d16a81ad8b62875cca19496e00e;p=emacs.git Merge pull request from phillord/first-keyword Add a ":first" keyword for those occasions that it's necessary. GitHub-reference: https://github.com/jwiegley/use-package/issues/42 --- 901272a8c7f86d16a81ad8b62875cca19496e00e diff --cc lisp/use-package/use-package.el index f20987a51f2,1ff776ccdf7..74ed4c36dab --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@@ -464,21 -420,20 +473,22 @@@ For full documentation. please see comm :defines Define vars to silence byte-compiler. :load-path Add to `load-path' before loading. :diminish Support for diminish package (if it's installed). -:idle adds a form to run on an idle timer" +:idle adds a form to run on an idle timer +:ensure loads package using package.el if necessary." + (use-package-validate-keywords args) ; error if any bad keyword, ignore result (let* ((commands (plist-get args :commands)) (pre-init-body (plist-get args :pre-init)) + (pre-load-body (plist-get args :pre-load)) (init-body (plist-get args :init)) (config-body (plist-get args :config)) - (diminish-var (plist-get args :diminish)) - (defines (plist-get args :defines)) + (diminish-var (plist-get-value args :diminish)) + (defines (plist-get-value args :defines)) (idle-body (plist-get args :idle)) - (keybindings ) - (mode-alist ) - (interpreter-alist ) + (keybindings-alist (plist-get-value args :bind)) + (mode-alist (plist-get-value args :mode)) + (interpreter-alist (plist-get-value args :interpreter)) (predicate (plist-get args :if)) - (pkg-load-path (plist-get args :load-path)) + (pkg-load-path (plist-get-value args :load-path)) (defines-eval (if (null defines) nil (if (listp defines) @@@ -569,9 -525,10 +580,10 @@@ #'(lambda (interpreter) `(add-to-list 'interpreter-mode-alist (quote ,interpreter))) - (plist-get args :interpreter))) + interpreter-alist)) `(progn + ,pre-load-body ,@(mapcar #'(lambda (path) `(add-to-list 'load-path