From d683effd234fc53dfd92603df392ff32357e98f6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Nov 2019 21:35:04 -0500 Subject: [PATCH] Recognize single-character envvars in doom-load-envvars-file And preserve insertion order for process-environment's new value. --- core/core.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core.el b/core/core.el index 57b3e816d..cb12f8d08 100644 --- a/core/core.el +++ b/core/core.el @@ -438,7 +438,7 @@ in interactive sessions, nil otherwise (but logs a warning)." (save-excursion (insert "\n") (insert-file-contents file)) - (while (re-search-forward "\n *\\([^#][^= \n]+\\)=" nil t) + (while (re-search-forward "\n *\\([^#][^= \n]*\\)=" nil t) (push (buffer-substring (match-beginning 1) (1- (or (save-excursion @@ -448,12 +448,12 @@ in interactive sessions, nil otherwise (but logs a warning)." environment))) (when environment (setq-default - process-environment environment + process-environment (nreverse environment) exec-path (append (parse-colon-path (getenv "PATH")) (list exec-directory)) shell-file-name (or (getenv "SHELL") shell-file-name)) - t)))) + process-environment)))) (defun doom-initialize (&optional force-p) "Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil).