diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2020-04-17 10:27:36 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2020-12-03 17:25:04 +0000 |
commit | 6ecec6096697729491ba141e7650ad69de5f034e (patch) | |
tree | 74a3a028a59db0d94cc62d2df77edeb9539164eb /lisp/shell.el | |
parent | 55300e6cdc9b33b52cf17fe64a8ffbb6dce7ae8f (diff) | |
download | emacs-6ecec6096697729491ba141e7650ad69de5f034e.tar.gz |
Define explicit-shell-file-name only in shell.el
For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2020-04/msg00880.html
* doc/emacs/cmdargs.texi (General Variables): Mention
shell-file-name in relation to SHELL.
* doc/emacs/misc.texi (Interactive Shell): Move index entry for
SHELL environment variable from here, where it is not mentioned...
(Single Shell): ...to here, where it is discussed along with
shell-file-name.
* lisp/dired.el (dired-insert-directory): Use shell-file-name
instead of explicit-shell-file-name when a shell is implicitly
requested.
* lisp/obsolete/terminal.el (explicit-shell-file-name):
* lisp/term.el (explicit-shell-file-name): Remove duplicate
defcustoms and load lisp/shell.el instead. (Bug#40679)
* lisp/shell.el (explicit-shell-file-name): Clarify docstring.
(shell): Simplify.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r-- | lisp/shell.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 51937cdeef3..5fed6513b96 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -265,10 +265,11 @@ see the function `dirtrack-mode'." :group 'shell-directories) (defcustom explicit-shell-file-name nil - "If non-nil, is file name to use for explicitly requested inferior shell. -When nil, such interactive shell sessions fallback to using either -the shell specified in $ESHELL or in `shell-file-name'." - :type '(choice (const :tag "None" nil) file) + "If non-nil, the file name to use for explicitly requested inferior shells. +When nil, such interactive shell sessions fall back to using the +shell specified in either the environment variable \"ESHELL\" or +`shell-file-name'." + :type '(choice (const :tag "Default" nil) file) :group 'shell) ;; Note: There are no explicit references to the variable `explicit-csh-args'. @@ -748,16 +749,15 @@ Make the shell buffer the current buffer, and return it. (with-connection-local-variables ;; On remote hosts, the local `shell-file-name' might be useless. - (when (file-remote-p default-directory) - (if (and (called-interactively-p 'any) + (when (and (file-remote-p default-directory) + (called-interactively-p 'any) (null explicit-shell-file-name) (null (getenv "ESHELL"))) - (set (make-local-variable 'explicit-shell-file-name) - (file-local-name - (expand-file-name - (read-file-name - "Remote shell path: " default-directory shell-file-name - t shell-file-name)))))) + (setq-local explicit-shell-file-name + (file-local-name + (expand-file-name + (read-file-name "Remote shell path: " default-directory + shell-file-name t shell-file-name))))) ;; Rain or shine, BUFFER must be current by now. (unless (comint-check-proc buffer) |