changeset 83753:63012e03e1d4

(shell): Return correct value from interactive spec.
author Andreas Schwab <schwab@suse.de>
date Wed, 29 Aug 2007 13:34:42 +0000
parents c9fcdc0c3704
children 4b814d562c72
files lisp/shell.el
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Wed Aug 29 13:25:36 2007 +0000
+++ b/lisp/shell.el	Wed Aug 29 13:34:42 2007 +0000
@@ -542,15 +542,16 @@
   (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).