Skip to content

Commit 4cbdf1e

Browse files
committed
feat(core): add an option to load all modules
1 parent fd128f6 commit 4cbdf1e

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.github/workflows/scripts/minemacs-all.d/modules.el

Lines changed: 0 additions & 12 deletions
This file was deleted.

core/me-vars.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ environment variable \"$MINEMACS_IGNORE_USER_CONFIG\".")
6666
(or minemacs-always-demand-p (daemonp) (and (getenv "MINEMACS_NOT_LAZY") t))
6767
"Load lazy packages (minemacs-lazy-hook) immediately.")
6868

69+
(defconst minemacs-load-all-modules-p
70+
(and (getenv "MINEMACS_LOAD_ALL_MODULES") t)
71+
"Force loading all MinEmacs modules.")
72+
6973
(defcustom minemacs-msg-level
7074
(let ((level (string-to-number (or (getenv "MINEMACS_MSG_LEVEL") ""))))
7175
(cond (minemacs-verbose-p 4)

init.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ goes idle."
211211
(+load minemacs-core-dir "me-modules.el")
212212
(+load-user-configs 'modules 'local/modules))
213213

214+
;; When the MINEMACS_LOAD_ALL_MODULES environment variable is set, we force
215+
;; loading all modules.
216+
(when minemacs-load-all-modules-p
217+
(setq minemacs-core-modules '(me-splash me-keybindings me-evil me-core-ui me-completion)
218+
minemacs-modules (mapcar #'intern (mapcar #'file-name-sans-extension (directory-files minemacs-modules-dir nil "\\.el\\'")))))
219+
214220
;; NOTE: Ensure the `me-gc' module is in the core modules list. This module
215221
;; enables the `gcmh-mode' package (a.k.a. the Garbage Collector Magic Hack).
216222
;; This GCMH minimizes GC interference with the activity by using a high GC

0 commit comments

Comments
 (0)