# HG changeset patch # User John Wiegley # Date 1020458633 0 # Node ID 06120f91eb064395de7b1dbe955b9c1ea42c842c # Parent b71c3c733b9ab6b2dad93b03e0eef16871c97b37 (eshell-modify-global-environment): Added this customization variable, which will cause any "export" commands within any eshell buffer to modify the global Emacs environment. It defaults to nil, which means that such commands will only modify that Eshell buffer's environment. (eshell-var-initialize): Initialize `eshell-modify-global-environment'. diff -r b71c3c733b9a -r 06120f91eb06 lisp/eshell/esh-var.el --- a/lisp/eshell/esh-var.el Fri May 03 20:43:36 2002 +0000 +++ b/lisp/eshell/esh-var.el Fri May 03 20:43:53 2002 +0000 @@ -137,6 +137,11 @@ :type 'boolean :group 'eshell-var) +(defcustom eshell-modify-global-environment nil + "*If non-nil, using `export' changes Emacs's global environment." + :type 'boolean + :group 'eshell-var) + (defcustom eshell-variable-name-regexp "[A-Za-z0-9_-]+" "*A regexp identifying what constitutes a variable name reference. Note that this only applies for '$NAME'. If the syntax '$' is @@ -199,7 +204,9 @@ "Initialize the variable handle code." ;; Break the association with our parent's environment. Otherwise, ;; changing a variable will affect all of Emacs. - (set (make-local-variable 'process-environment) (eshell-copy-environment)) + (unless eshell-modify-global-environment + (set (make-local-variable 'process-environment) + (eshell-copy-environment))) (define-key eshell-command-map [(meta ?v)] 'eshell-insert-envvar)