diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2007-08-22 19:47:57 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2007-08-22 19:47:57 +0000 |
commit | 66a100be19467e6f616c5f6542b9e3f854cf079c (patch) | |
tree | c465a805b5c65bb0f9eec2b2d9d932889342cb88 /lisp/shell.el | |
parent | 7daa3523acb6ffcbaf309d400e5887719e285f05 (diff) | |
download | emacs-66a100be19467e6f616c5f6542b9e3f854cf079c.tar.gz |
* comint.el (comint-exec-1): Raise an error if
`start-file-process' does not return a process object.
* shell.el (shell): Prompt for `default-directory' if it is a
remote file name, and if called with a prefix arg.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r-- | lisp/shell.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 03fbf46df67..6c09654a0e5 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -511,6 +511,9 @@ Sentinels will always get the two parameters PROCESS and EVENT." (defun shell (&optional buffer) "Run an inferior shell, with I/O through BUFFER (which defaults to `*shell*'). Interactively, a prefix arg means to prompt for BUFFER. +If `default-directory' is a remote file name, it is also prompted +to change if called with a prefix arg. + If BUFFER exists but shell process is not running, make new shell. If BUFFER exists and shell process is running, just switch to BUFFER. Program used comes from variable `explicit-shell-file-name', @@ -540,7 +543,14 @@ Otherwise, one argument `-i' is passed to the shell. (list (and current-prefix-arg (read-buffer "Shell buffer: " - (generate-new-buffer-name "*shell*"))))) + (generate-new-buffer-name "*shell*")) + (file-remote-p default-directory) + ;; It must be possible to declare a local default-directory. + (setq default-directory + (expand-file-name + (read-file-name + "Default directory: " default-directory default-directory + t nil 'file-directory-p)))))) (setq buffer (get-buffer-create (or buffer "*shell*"))) ;; 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). |