refactor(cli): don't reboot bin/doom on --pager

Also adds comments to explain why we're rebooting (or not) for these
settings.
This commit is contained in:
Henrik Lissner 2022-06-22 11:47:54 +02:00
parent f0a11da072
commit 209092c578
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -203,12 +203,12 @@ SEE ALSO:
instead."
(when color?
(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
debug?
emacsdir
doomdir
pager))
doomdir))
;; TODO Implement after v3.0
;; (when profile
;; (setenv "DOOMPROFILE" profile))
@ -219,9 +219,10 @@ SEE ALSO:
(setenv "EMACSDIR" emacsdir))
(when doomdir
(setenv "DOOMDIR" doomdir))
(exit! :restart))
;; But these don't need a restart:
(when pager
(setenv "DOOMPAGER" pager))
(exit! :restart))
(when force?
(setf (doom-cli-context-suppress-prompts-p context) t)
(doom-log "User requested all prompts be suppressed"))