Skip to content

Commit

Permalink
tweak(core): add an option to disable all user config files
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 15, 2023
1 parent b65ee69 commit 5c6739e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ You can customize MinEmacs' behavior via some environment variables.
- `MINEMACS_IGNORE_USER_CONFIG`: space-separated values, used to disables loading
`~/.minemacs.d/<file>.el` user configuration files. Accepted values for `<file>`
are: `early-config`, `init-tweaks`, `modules`, `config`, `local/early-config`,
`local/init-tweaks`, `local/modules` and `local/config`.
`local/init-tweaks`, `local/modules` and `local/config`. Use `all` to disable all
user configuration files.

### Load and hooks order
MinEmacs loads its features and run hooks in this order:
Expand Down
4 changes: 3 additions & 1 deletion core/me-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@

(defconst minemacs-ignore-user-config
(when-let ((ignores (getenv "MINEMACS_IGNORE_USER_CONFIG")))
(mapcar #'intern (mapcar #'downcase (split-string ignores))))
(if (string= (downcase ignores) "all")
'(early-config init-tweaks modules config local/early-config local/init-tweaks local/modules local/config)
(mapcar #'intern (mapcar #'downcase (split-string ignores)))))
"Ignore loading these user configuration files.
Accepted values are: early-config, init-tweaks, modules, config,
local/early-config, local/init-tweaks, local/modules and local/config.
Expand Down

0 comments on commit 5c6739e

Please sign in to comment.