From d9af69518ec6cb4688d5f860d6152458cf0a8fca Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 29 Aug 2007 13:35:16 +0000 Subject: [PATCH] (shell): Return correct value from interactive spec. --- lisp/ChangeLog | 4 ++++ lisp/shell.el | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f7758d2240..36418a1caa0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-08-29 Andreas Schwab + + * shell.el (shell): Return correct value from interactive spec. + 2007-08-29 Glenn Morris * version.el (emacs-version): Increase to 23.0.50. 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). -- 2.39.2