Commit b2c8319e authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(Interactive Shell): Document that EMACS is only put into the shell's

environment if it is not already defined.  From Francois Pinard.
parent 5333e22e
...@@ -392,7 +392,6 @@ and will store the decoded output into the file whose name is ...@@ -392,7 +392,6 @@ and will store the decoded output into the file whose name is
specified in the encoded text. specified in the encoded text.
@vindex shell-file-name @vindex shell-file-name
@cindex environment
Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the
shell to use. This variable is initialized based on your @env{SHELL} shell to use. This variable is initialized based on your @env{SHELL}
environment variable when Emacs is started. If the file name does not environment variable when Emacs is started. If the file name does not
...@@ -449,6 +448,7 @@ a buffer name, and create (or reuse) a subshell in that buffer. All ...@@ -449,6 +448,7 @@ a buffer name, and create (or reuse) a subshell in that buffer. All
subshells in different buffers run independently and in parallel. subshells in different buffers run independently and in parallel.
@vindex explicit-shell-file-name @vindex explicit-shell-file-name
@cindex environment variables for subshells
@cindex @env{ESHELL} environment variable @cindex @env{ESHELL} environment variable
@cindex @env{SHELL} environment variable @cindex @env{SHELL} environment variable
The file name used to load the subshell is the value of the variable The file name used to load the subshell is the value of the variable
...@@ -471,9 +471,11 @@ from. For example, if you use bash, the file sent to it is ...@@ -471,9 +471,11 @@ from. For example, if you use bash, the file sent to it is
specify a coding system after starting the shell by using @kbd{C-x specify a coding system after starting the shell by using @kbd{C-x
@key{RET} p} in the shell buffer. @xref{Specify Coding}. @key{RET} p} in the shell buffer. @xref{Specify Coding}.
Emacs defines the environment variable @env{EMACS} in the subshell, @cindex @env{EMACS} environment variable
with value @code{t}. A shell script can check this variable to Unless the environment variable @env{EMACS} is already defined,
determine whether it has been run from an Emacs subshell. Emacs defines it in the subshell, with value @code{t}. A shell script
can check this variable to determine whether it has been run from an
Emacs subshell.
@node Shell Mode @node Shell Mode
@subsection Shell Mode @subsection Shell Mode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment