summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-08-29 13:35:16 +0000
committerAndreas Schwab <schwab@suse.de>2007-08-29 13:35:16 +0000
commitd9af69518ec6cb4688d5f860d6152458cf0a8fca (patch)
tree90aa35aff62550f749e3618eb05e527d587b8b3c /lisp/shell.el
parent03f06e5cf509e901ee75ec96c697c383487bdae7 (diff)
(shell): Return correct value from interactive spec.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el19
1 files changed, 10 insertions, 9 deletions
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).