eval-after-load -> with-eval-after-load
The way Doom was using eval-after-load ensured its form were never byte-compiled or even checked by the byte-compiler, because they were treated as quoted forms (data), and thus eval'ed. Friends don't let friends use eval.
This commit is contained in:
parent
9f9b7ad792
commit
5cb1d5d4c9
1 changed files with 2 additions and 1 deletions
|
@ -232,7 +232,8 @@ compilation. This will no-op on features that have been disabled by the user."
|
|||
(put ',fun 'permanent-local-hook t)
|
||||
(add-hook 'after-load-functions #',fun)))))
|
||||
((symbolp targets)
|
||||
`(eval-after-load ',targets '(progn ,@body)))
|
||||
`(with-eval-after-load ',targets
|
||||
,@body))
|
||||
((and (consp targets)
|
||||
(memq (car targets) '(:or :any)))
|
||||
`(progn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue