mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
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
This commit is contained in:
commit
901272a8c7
1 changed files with 12 additions and 0 deletions
|
@ -147,6 +147,12 @@
|
||||||
;; value of `use-package-verbose'. Other good candidates for `:idle' are
|
;; value of `use-package-verbose'. Other good candidates for `:idle' are
|
||||||
;; `yasnippet', `auto-complete' and `autopair'.
|
;; `yasnippet', `auto-complete' and `autopair'.
|
||||||
;;
|
;;
|
||||||
|
;; Finally, you may wish to use `:pre-load'. This form runs before everything
|
||||||
|
;; else whenever the `use-package' form evals; the package in question will
|
||||||
|
;; never have been required. This can be useful, if you wish for instance, to
|
||||||
|
;; pull files from a git repository, or mount a file system. Like :init,
|
||||||
|
;; keeping this form as simple as possible makes sense.
|
||||||
|
;;
|
||||||
;; The `:bind' keyword takes either a cons or a list of conses:
|
;; The `:bind' keyword takes either a cons or a list of conses:
|
||||||
;;
|
;;
|
||||||
;; (use-package hi-lock
|
;; (use-package hi-lock
|
||||||
|
@ -454,6 +460,9 @@ For full documentation. please see commentary.
|
||||||
:bind Perform key bindings, and define autoload for bound
|
:bind Perform key bindings, and define autoload for bound
|
||||||
commands.
|
commands.
|
||||||
:commands Define autoloads for given commands.
|
:commands Define autoloads for given commands.
|
||||||
|
:pre-load Code to run when `use-package' form evals and before
|
||||||
|
anything else. Unlike :init this form runs before the
|
||||||
|
package is required or autoloads added.
|
||||||
:mode Form to be added to `auto-mode-alist'.
|
:mode Form to be added to `auto-mode-alist'.
|
||||||
:interpreter Form to be added to `interpreter-mode-alist'.
|
:interpreter Form to be added to `interpreter-mode-alist'.
|
||||||
:defer Defer loading of package -- automatic
|
:defer Defer loading of package -- automatic
|
||||||
|
@ -469,6 +478,7 @@ For full documentation. please see commentary.
|
||||||
(use-package-validate-keywords args) ; error if any bad keyword, ignore result
|
(use-package-validate-keywords args) ; error if any bad keyword, ignore result
|
||||||
(let* ((commands (plist-get args :commands))
|
(let* ((commands (plist-get args :commands))
|
||||||
(pre-init-body (plist-get args :pre-init))
|
(pre-init-body (plist-get args :pre-init))
|
||||||
|
(pre-load-body (plist-get args :pre-load))
|
||||||
(init-body (plist-get args :init))
|
(init-body (plist-get args :init))
|
||||||
(config-body (plist-get args :config))
|
(config-body (plist-get args :config))
|
||||||
(diminish-var (plist-get-value args :diminish))
|
(diminish-var (plist-get-value args :diminish))
|
||||||
|
@ -496,6 +506,7 @@ For full documentation. please see commentary.
|
||||||
|
|
||||||
;; force this immediately -- one off cost
|
;; force this immediately -- one off cost
|
||||||
(unless (plist-get args :disabled)
|
(unless (plist-get args :disabled)
|
||||||
|
|
||||||
(let* ((ensure (plist-get args :ensure))
|
(let* ((ensure (plist-get args :ensure))
|
||||||
(package-name
|
(package-name
|
||||||
(or (and (eq ensure t)
|
(or (and (eq ensure t)
|
||||||
|
@ -572,6 +583,7 @@ For full documentation. please see commentary.
|
||||||
interpreter-alist))
|
interpreter-alist))
|
||||||
|
|
||||||
`(progn
|
`(progn
|
||||||
|
,pre-load-body
|
||||||
,@(mapcar
|
,@(mapcar
|
||||||
#'(lambda (path)
|
#'(lambda (path)
|
||||||
`(add-to-list 'load-path
|
`(add-to-list 'load-path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue