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:
parent
1ecb5c7b9b
commit
5af38fb08e
5 changed files with 154 additions and 67 deletions
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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue