emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103649: * shell.el (shell): When cal


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103649: * shell.el (shell): When called interactively, offer to change the
Date: Mon, 14 Mar 2011 10:53:13 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103649
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2011-03-14 10:53:13 +0100
message:
  * shell.el (shell): When called interactively, offer to change the
  shell file name on remote hosts.
modified:
  lisp/ChangeLog
  lisp/shell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-13 22:17:17 +0000
+++ b/lisp/ChangeLog    2011-03-14 09:53:13 +0000
@@ -1,3 +1,8 @@
+2011-03-14  Michael Albinus  <address@hidden>
+
+       * shell.el (shell): When called interactively, offer to change the
+       shell file name on remote hosts.
+
 2011-03-13  Teodor Zlatanov  <address@hidden>
 
        * net/ldap.el (ldap-search-internal): Add `auth-source-search'

=== modified file 'lisp/shell.el'
--- a/lisp/shell.el     2011-03-09 09:01:14 +0000
+++ b/lisp/shell.el     2011-03-14 09:53:13 +0000
@@ -583,6 +583,21 @@
                    (get-buffer-create (or buffer "*shell*"))
                  ;; If the current buffer is a dead shell buffer, use it.
                  (current-buffer)))
+
+  ;; On remote hosts, the local `shell-file-name' might be useless.
+  (if (and (interactive-p)
+          (file-remote-p default-directory)
+          (null explicit-shell-file-name)
+          (null (getenv "ESHELL")))
+      (with-current-buffer buffer
+       (set (make-local-variable 'explicit-shell-file-name)
+            (file-remote-p
+             (expand-file-name
+              (read-file-name
+               "Remote shell path: " default-directory shell-file-name
+               t shell-file-name))
+             'localname))))
+
   ;; Pop to buffer, so that the buffer's window will be correctly set
   ;; when we call comint (so that comint sets the COLUMNS env var properly).
   (pop-to-buffer buffer)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]