branch: elpa/exec-path-from-shell
commit d14d6d2966efe5a1409f84a6b9d998268f74761d
Merge: 4ea306a76f a45edbc2d0
Author: Steve Purcell <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #101 from mnewt/eshell-path-env-in-buffers
Set each instance of the buffer local variable eshell-path-env
---
exec-path-from-shell.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index e0e381f42e..89eed8b5e7 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -225,8 +225,10 @@ Additionally, if NAME is \"PATH\" then also update the
variables `exec-path' and `eshell-path-env'."
(setenv name value)
(when (string-equal "PATH" name)
- (setq eshell-path-env value
- exec-path (append (parse-colon-path value) (list exec-directory)))))
+ (setq exec-path (append (parse-colon-path value) (list exec-directory)))
+ ;; `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)