doomemacs/lisp/lib
Henrik Lissner 5a5195b84d
fix: add :depth field to modules
This introduces a depth field for modules so that they may dictate their
load order explicitly, it also treats depths <= -100 or >= 100 as
special depths, which will be loaded early, before their respective
doom-{before,after}-module-{init,config}-hook. This permits psuedo
modules like :core and :user modules to be treated as normal modules
without too many special cases.

This also fixes a module load order issue on Emacs 29 (#6813), caused by
emacs-mirror/emacs@4311bd0bd7, which changed the return value order of
hash-table-{keys,values} causing modules to be loaded in reverse order;
resulting in the loss of evil keybinds, among other things.

Other notable changes:
- Changes the data structure for module data caches from a list to a
  vector. Uses less memory and permits faster lookups. Also adds two
  depth fields to the front of it.
- Changes the signature of doom-module-list and doom-package-list.
- Renames doom--read-packages -> doom-packages--read for consistency
  with naming convention.
- Add doom-module-depth function.
- Adds a temporary doom-core-dir/init.el file, which is responsible for
  loading doom-*.el.

Fix: #6813
Ref: emacs-mirror/emacs@4311bd0bd7
2022-09-24 18:46:21 +02:00
..
autoloads.el perf: disable autoload-compute-prefixes & optimize var cache 2022-09-20 01:43:33 +02:00
buffers.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
config.el fix(lib): doom/reload to reflect recent changes 2022-09-18 13:10:49 +02:00
debug.el fix: add :depth field to modules 2022-09-24 18:46:21 +02:00
docs.el bump: :lang org 2022-09-18 13:10:49 +02:00
files.el fix(lib): void-function insert-into-buffer on Emacs 27 2022-09-16 01:14:20 +02:00
fonts.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
git.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
help.el fix(lib): doom/help-search-{load-path,loaded-files} 2022-09-20 02:29:08 +02:00
packages.el fix: add :depth field to modules 2022-09-24 18:46:21 +02:00
plist.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
print.el fix(cli): debug output despite no debug-mode 2022-09-19 17:33:25 +02:00
process.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
projects.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
sandbox.el refactor!: redesign module init/config hooks 2022-09-16 01:14:22 +02:00
scratch.el refactor: deprecate doom-etc-dir for doom-data-dir 2022-08-14 20:43:35 +02:00
sessions.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
store.el refactor: deprecate doom-etc-dir for doom-data-dir 2022-08-14 20:43:35 +02:00
system.el refactor(lib): use num-processors 2022-09-08 13:36:17 +02:00
text.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
themes.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
ui.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00