Skip to content

Commit 48efe7c

Browse files
committed
docs(readme): add hooks/files load order
1 parent e3c7bb5 commit 48efe7c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,34 @@ You can customize MinEmacs' behavior via some environment variables.
130130
- `MINEMACS_IGNORE_USER_CONFIG`: Ignore loading all user configuration files
131131
(present in `~/.minemacs.d`, or directory pointed by `$MINEMACSDIR`).
132132

133+
### Load and hooks order
134+
MinEmacs loads its features and run hooks in this order:
135+
136+
- `~/.emacs.d/early-init.el`
137+
- `$MINEMACSDIR/early-config.el` (unless `$MINEMACS_IGNORE_USER_CONFIG` or `$MINEMACS_IGNORE_EARLY_CONFIG_EL`)
138+
- `~/.emacs.d/init.el`
139+
- `~/.emacs.d/core/me-vars.el`
140+
- `~/.emacs.d/core/backports/*.el` (when Emacs < 29)
141+
- `~/.emacs.d/core/me-loaddefs.el`
142+
- `~/.emacs.d/core/init-tweaks.el` (unless `$MINEMACS_IGNORE_USER_CONFIG` or `$MINEMACS_IGNORE_INIT_TWEAKS_EL`)
143+
- `before-init-hook`
144+
- `$MINEMACSDIR/modules.el` (unless `$MINEMACS_IGNORE_USER_CONFIG` or `$MINEMACS_IGNORE_MODULES_EL`)
145+
- `~/.emacs.d/core/[minemacs-core-modules].el`
146+
- `~/.emacs.d/modules/[minemacs-modules].el`
147+
- `minemacs-after-loading-modules-hook`
148+
- `$MINEMACSDIR/custom-vars.el`
149+
- `$MINEMACSDIR/config.el` (unless `$MINEMACS_IGNORE_USER_CONFIG` or `$MINEMACS_IGNORE_CONFIG_EL`)
150+
- `after-init-hook`
151+
- `emacs-startup-hook`
152+
- `minemacs-after-startup-hook`
153+
- `minemacs-lazy-hook` (delayed)
154+
155+
Special hooks defined with `+make-first-file-hook!`:
156+
157+
- `minemacs-first-file-hook`
158+
- `minemacs-first-elisp-file-hook`
159+
- `minemacs-first-org-file-hook`
160+
133161
## Troubleshooting
134162
If you experienced an issue with MinEmacs, you can check the [FAQ](FAQ.md), check [open
135163
issues or open a new one](https://github.com/abougouffa/minemacs/issues).

0 commit comments

Comments
 (0)