core-packages: use-package update + temporary :after fix
This commit is contained in:
parent
88454f58ec
commit
1bd33f6ff1
1 changed files with 22 additions and 1 deletions
|
@ -146,7 +146,28 @@ to speed up startup."
|
|||
(require 'use-package)
|
||||
;; Strip package management from use-package; DOOM handles this its own way
|
||||
(mapc (lambda (keyword) (setq use-package-keywords (delq keyword use-package-keywords)))
|
||||
'(:ensure :pin))
|
||||
'(:ensure :pin :defer-install))
|
||||
|
||||
;; In a recent update, the :after property stopped working for `use-package'.
|
||||
;; This fixes the problem, but must be removed as soon as the fix is released.
|
||||
;; See https://github.com/jwiegley/use-package/pull/439
|
||||
(defun doom*use-package-handler/:after (name keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest
|
||||
(plist-put state :deferred t)))
|
||||
(name-string (use-package-as-string name)))
|
||||
(if (and (consp arg)
|
||||
(not (memq (car arg) '(:or :any :and :all))))
|
||||
(setq arg (cons :all arg)))
|
||||
(use-package-concat
|
||||
(when arg
|
||||
(list (funcall (use-package-require-after-load arg)
|
||||
(macroexp-progn
|
||||
`(,@(when (eq (plist-get state :defer-install) :ensure)
|
||||
`((use-package-install-deferred-package
|
||||
'name :after)))
|
||||
(require (quote ,name) nil t))))))
|
||||
body)))
|
||||
(advice-add 'use-package-handler/:after :override 'doom*use-package-handler/:after)
|
||||
|
||||
(setq doom-init-p t)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue