aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-03-14 10:53:13 +0100
committerMichael Albinus2011-03-14 10:53:13 +0100
commit77c992bc5065ade7f460fa6f966f6b3e6aaa97fa (patch)
treea602471112c3c68c3f456287a0beb620cf56d226
parentcffc6f3bd9b5dbb9825502928bd9dd58ddbac02e (diff)
downloademacs-77c992bc5065ade7f460fa6f966f6b3e6aaa97fa.tar.gz
emacs-77c992bc5065ade7f460fa6f966f6b3e6aaa97fa.zip
* shell.el (shell): When called interactively, offer to change the
shell file name on remote hosts.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/shell.el15
2 files changed, 20 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c74e7cbdb2d..b36be6f3a09 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-03-14 Michael Albinus <michael.albinus@gmx.de>
2
3 * shell.el (shell): When called interactively, offer to change the
4 shell file name on remote hosts.
5
12011-03-13 Teodor Zlatanov <tzz@lifelogs.com> 62011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * net/ldap.el (ldap-search-internal): Add `auth-source-search' 8 * net/ldap.el (ldap-search-internal): Add `auth-source-search'
diff --git a/lisp/shell.el b/lisp/shell.el
index bceea990baf..dde81c6cb95 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -583,6 +583,21 @@ Otherwise, one argument `-i' is passed to the shell.
583 (get-buffer-create (or buffer "*shell*")) 583 (get-buffer-create (or buffer "*shell*"))
584 ;; If the current buffer is a dead shell buffer, use it. 584 ;; If the current buffer is a dead shell buffer, use it.
585 (current-buffer))) 585 (current-buffer)))
586
587 ;; On remote hosts, the local `shell-file-name' might be useless.
588 (if (and (interactive-p)
589 (file-remote-p default-directory)
590 (null explicit-shell-file-name)
591 (null (getenv "ESHELL")))
592 (with-current-buffer buffer
593 (set (make-local-variable 'explicit-shell-file-name)
594 (file-remote-p
595 (expand-file-name
596 (read-file-name
597 "Remote shell path: " default-directory shell-file-name
598 t shell-file-name))
599 'localname))))
600
586 ;; Pop to buffer, so that the buffer's window will be correctly set 601 ;; Pop to buffer, so that the buffer's window will be correctly set
587 ;; when we call comint (so that comint sets the COLUMNS env var properly). 602 ;; when we call comint (so that comint sets the COLUMNS env var properly).
588 (pop-to-buffer buffer) 603 (pop-to-buffer buffer)