mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
feat: make bin/doom profile aware
- Fixes Doom's former inability to (trivially) juggle multiple profiles based on the same EMACSDIR (see #6593). - Adds '--profile NAME' switch to bin/doom (also recognized $DOOMPROFILE). - Adds new doom-profile* variables. These will eventually replace doom-{local,etc,cache}-dir and doom-{autoloads,env}-file. This is intentionally messy to ensure backwards compatibility for a little while longer. This will be fixed over the next couple weeks. Ref: #6593
This commit is contained in:
10
bin/doom
10
bin/doom
@@ -180,8 +180,7 @@ SEE ALSO:
|
||||
(doomdir ("--doomdir" dir) "Use Doom config living in `DIR' (e.g. ~/.doom.d)")
|
||||
(emacsdir ("--emacsdir" dir) "Use Doom install living in `DIR' (e.g. ~/.emacs.d)")
|
||||
(pager ("--pager" cmd) "Pager command to use for large output")
|
||||
;; TODO Implement after v3.0
|
||||
;; (profile ("--profile" name) "Use profile named NAME")
|
||||
(profile ("--profile" name) "Use profile named NAME")
|
||||
&flags
|
||||
(color? ("--color") "Whether or not to show ANSI color codes")
|
||||
&multiple
|
||||
@@ -205,13 +204,12 @@ SEE ALSO:
|
||||
(setq doom-print-backend (if (eq color? :yes) 'ansi)))
|
||||
;; For these settings to take full effect, the script must be restarted:
|
||||
(when (and (equal (doom-cli-context-step context) 0)
|
||||
(or ;; profile
|
||||
(or profile
|
||||
debug?
|
||||
emacsdir
|
||||
doomdir))
|
||||
;; TODO Implement after v3.0
|
||||
;; (when profile
|
||||
;; (setenv "DOOMPROFILE" profile))
|
||||
(when profile
|
||||
(setenv "DOOMPROFILE" profile))
|
||||
(when debug?
|
||||
(setenv "DEBUG" "1")
|
||||
(print! (item "Debug mode enabled")))
|
||||
|
Reference in New Issue
Block a user