]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell): Return correct value from interactive spec.
authorAndreas Schwab <schwab@suse.de>
Wed, 29 Aug 2007 13:35:16 +0000 (13:35 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 29 Aug 2007 13:35:16 +0000 (13:35 +0000)
lisp/ChangeLog
lisp/shell.el

index 3f7758d2240c2fed44eadc36ea1123c3eb6b7014..36418a1caa0a30d8fb938d0a697c1007bbf1a80e 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-29  Andreas Schwab  <schwab@suse.de>
+
+       * shell.el (shell): Return correct value from interactive spec.
+
 2007-08-29  Glenn Morris  <rgm@gnu.org>
 
        * version.el (emacs-version): Increase to 23.0.50.
index 6c09654a0e57db602444a617ced3e6750ad28a76..392440ede81e896c30b59620db9ebee59fb59e43 100644 (file)
@@ -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).