;; value of `use-package-verbose'. Other good candidates for `:idle' are
;; `yasnippet', `auto-complete' and `autopair'.
;;
+;; Finally, you may wish to use `:first'. 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.
+;;
;; The `:bind' keyword takes either a cons or a list of conses:
;;
;; (use-package hi-lock
:bind Perform key bindings, and define autoload for bound
commands.
:commands Define autoloads for given commands.
+:first 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'.
:interpreter Form to be added to `interpreter-mode-alist'.
:defer Defer loading of package -- automatic
:idle adds a form to run on an idle timer"
(let* ((commands (plist-get args :commands))
(pre-init-body (plist-get args :pre-init))
+ (first-body (plist-get args :first))
(init-body (plist-get args :init))
(config-body (plist-get args :config))
(diminish-var (plist-get args :diminish))
;; force this immediately -- one off cost
(unless (plist-get args :disabled)
+
(let* ((ensure (plist-get args :ensure))
(package-name
(or (and (eq ensure t)
(plist-get args :interpreter)))
`(progn
+ ,first-body
,@(mapcar
#'(lambda (path)
`(add-to-list 'load-path