-
-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Description
Forgive me if this was intended, but this is something that bites me often, when I use use-package in Doom Emacs. I'll illustrate the issue with these two snippets:
(with-eval-after-load 'foo
(message "1"))
(use-package foo
:defer t
:config (message "2"))
(with-eval-after-load 'foo
(message "3"))
(require 'foo) ; #=> prints 1, 2, then 3(with-eval-after-load 'foo
(message "1"))
(use-package foo
:after bar
:config (message "2"))
(with-eval-after-load 'foo
(message "3"))
(require 'bar) ; #=> 1, 3, then 2This is because the use-package block for foo expands to:
(eval-after-load 'bar
'(progn
(require 'foo nil nil) ; executes all of `foo's after-load-alist handlers
(message "2")
t))But should it not respect insertion order into after-load-alist? e.g.
(eval-after-load 'foo
'(message "2"))
(eval-after-load 'bar
'(progn
(require 'foo nil nil)
t))EDIT: Corrected a couple mistakes in the examples.
Metadata
Metadata
Assignees
Labels
No labels