Ignore value of EMACS if INSIDE_EMACS is set #156
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ignore value of EMACS, regardless of its value, if INSIDE_EMACS is set.
According to the Emacs manual, EMACS should be set to "t" if
INSIDE_EMACS is set:
36.2 Interactive Subshell
Emacs sets the environment variable
INSIDE_EMACS' in the subshell to
VERSION,comint', where VERSION is the Emacs version (e.g.,24.1'). Programs can check this variable to determine whether they are running inside an Emacs subshell. (It also sets the
EMACS' environmentvariable to
t', if that environment variable is not already defined. However, this environment variable is deprecated; programs that use it should switch to using
INSIDE_EMACS' instead.)However, EMACS is set to a string containing the Emacs version in
24.3.50.1:
$ env | grep EMACS
EMACS=24.3.1 (term:0.96)
INSIDE_EMACS=24.3.1,term:0.96
Instead of relying on a known value of EMACS when INSIDE_EMACS is set,
just ignore the value of EMACS.