From d9af69518ec6cb4688d5f860d6152458cf0a8fca Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 29 Aug 2007 13:35:16 +0000 Subject: (shell): Return correct value from interactive spec. --- lisp/shell.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lisp/shell.el') diff --git a/lisp/shell.el b/lisp/shell.el index 6c09654a0e5..392440ede81 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -542,15 +542,16 @@ Otherwise, one argument `-i' is passed to the shell. (interactive (list (and current-prefix-arg - (read-buffer "Shell buffer: " - (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)))))) + (prog1 + (read-buffer "Shell buffer: " + (generate-new-buffer-name "*shell*")) + (if (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). -- cgit v1.2.3