Simplify after!
The featurep check is redundant. eval-after-load does it too.
This commit is contained in:
parent
eae7ca2c57
commit
b8b51cee7b
1 changed files with 4 additions and 7 deletions
|
@ -361,13 +361,10 @@ This is a wrapper around `eval-after-load' that:
|
||||||
(require package nil 'noerror))
|
(require package nil 'noerror))
|
||||||
#'progn
|
#'progn
|
||||||
#'with-no-warnings)
|
#'with-no-warnings)
|
||||||
(let ((body (macroexp-progn body)))
|
;; We intentionally avoid `with-eval-after-load' to prevent eager
|
||||||
`(if (featurep ',package)
|
;; macro expansion from pulling (or failing to pull) in autoloaded
|
||||||
,body
|
;; macros/packages.
|
||||||
;; We intentionally avoid `with-eval-after-load' to prevent
|
`(eval-after-load ',package ',(macroexp-progn body))))
|
||||||
;; eager macro expansion from pulling (or failing to pull) in
|
|
||||||
;; autoloaded macros/packages.
|
|
||||||
(eval-after-load ',package ',body)))))
|
|
||||||
(let ((p (car package)))
|
(let ((p (car package)))
|
||||||
(cond ((not (keywordp p))
|
(cond ((not (keywordp p))
|
||||||
`(after! (:and ,@package) ,@body))
|
`(after! (:and ,@package) ,@body))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue