doom-load-envvars-file: only affect default state
Some plugins (like envrc-mode) make process-environment, exec-path and shell-file-name buffer-local. Running `M-x doom/reload` or `doom-load-envvars-file` should affect their global values, and not their buffer local ones.
This commit is contained in:
parent
10f5916298
commit
002bf84f45
1 changed files with 10 additions and 4 deletions
|
@ -113,10 +113,16 @@ unreadable. Returns the names of envvars that were changed."
|
||||||
env (split-string (buffer-substring (match-beginning 1) (point-max))
|
env (split-string (buffer-substring (match-beginning 1) (point-max))
|
||||||
"\0\n"
|
"\0\n"
|
||||||
'omit-nulls))))))
|
'omit-nulls))))))
|
||||||
(setq process-environment (append (nreverse env) process-environment)
|
(setq-default
|
||||||
exec-path (append (split-string (getenv "PATH") path-separator t)
|
process-environment
|
||||||
(list exec-directory))
|
(append (nreverse env)
|
||||||
shell-file-name (or (getenv "SHELL") shell-file-name))
|
(default-value 'process-environment))
|
||||||
|
exec-path
|
||||||
|
(append (split-string (getenv "PATH") path-separator t)
|
||||||
|
(list exec-directory))
|
||||||
|
shell-file-name
|
||||||
|
(or (getenv "SHELL")
|
||||||
|
(default-value 'shell-file-name)))
|
||||||
env)))
|
env)))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue