branch: elpa/exec-path-from-shell
commit a45edbc2d0fd9f1d67cd60672e5b0f62fe4caf00
Author: Matthew Sojourner Newton <[email protected]>
Commit: Matthew Sojourner Newton <[email protected]>

    Per suggestion, change only the default value of eshell-path-env
---
 exec-path-from-shell.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 1151bafe7b..89eed8b5e7 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -226,13 +226,9 @@ variables `exec-path' and `eshell-path-env'."
   (setenv name value)
   (when (string-equal "PATH" name)
     (setq exec-path (append (parse-colon-path value) (list exec-directory)))
-    ;; `eshell-path-env' is a buffer local variable so we set the default value
-    ;; and then set the value in each `eshell' buffer.
-    (setq-default eshell-path-env value)
-    (dolist (buffer (buffer-list))
-      (with-current-buffer buffer
-        (when (derived-mode-p 'eshell-mode)
-          (setq eshell-path-env value))))))
+    ;; `eshell-path-env' is a buffer local variable, so change its default
+    ;; value.
+    (setq-default eshell-path-env value)))
 
 ;;;###autoload
 (defun exec-path-from-shell-copy-envs (names)

Reply via email to