Minor refactor of use-package-handler/:after-call
+ Duplicate hooks aren't a problem + letbind `fn` only when we need it
This commit is contained in:
parent
fbf7834d93
commit
16d3f75f1d
1 changed files with 3 additions and 4 deletions
|
@ -190,10 +190,9 @@ non-nil, return paths of possible modules, activated or otherwise."
|
||||||
|
|
||||||
(defalias 'use-package-normalize/:after-call 'use-package-normalize-symlist)
|
(defalias 'use-package-normalize/:after-call 'use-package-normalize-symlist)
|
||||||
(defun use-package-handler/:after-call (name _keyword hooks rest state)
|
(defun use-package-handler/:after-call (name _keyword hooks rest state)
|
||||||
(let ((fn (intern (format "doom|transient-hook--load-%s" name)))
|
|
||||||
(hooks (delete-dups hooks)))
|
|
||||||
(if (plist-get state :demand)
|
(if (plist-get state :demand)
|
||||||
(use-package-process-keywords name rest state)
|
(use-package-process-keywords name rest state)
|
||||||
|
(let ((fn (intern (format "doom|transient-hook--load-%s" name))))
|
||||||
(use-package-concat
|
(use-package-concat
|
||||||
`((fset ',fn
|
`((fset ',fn
|
||||||
(lambda (&rest _)
|
(lambda (&rest _)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue