mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -08:00
Added :pre-init
This commit is contained in:
parent
82a8d10a46
commit
d9f6c0f370
1 changed files with 4 additions and 1 deletions
|
|
@ -309,6 +309,7 @@
|
|||
|
||||
(defmacro use-package (name &rest args)
|
||||
(let* ((commands (plist-get args :commands))
|
||||
(pre-init-body (plist-get args :pre-init))
|
||||
(init-body (plist-get args :init))
|
||||
(config-body (plist-get args :config))
|
||||
(diminish-var (plist-get args :diminish))
|
||||
|
|
@ -425,8 +426,9 @@
|
|||
commands)
|
||||
|
||||
`(when ,(or predicate t)
|
||||
,init-body
|
||||
,pre-init-body
|
||||
,@form
|
||||
,init-body
|
||||
,(unless (null config-body)
|
||||
`(eval-after-load ,name-string
|
||||
'(if ,requires-test
|
||||
|
|
@ -442,6 +444,7 @@
|
|||
`(load ,name t)
|
||||
`(require ',name nil t)))
|
||||
(message "Could not load package %s" ,name-string)
|
||||
,pre-init-body
|
||||
,init-body
|
||||
,config-body
|
||||
t))))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue