# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 744796053 0
# Node ID b0a70d8d9af4326b018919d2e5d47378fb63c770
# Parent  177aaa70734d1a08e7b13c370160453f6ce035c5
(shell-command, shell-command-on-region):
Fix bugs in previous change.

diff -r 177aaa70734d -r b0a70d8d9af4 lisp/simple.el
--- a/lisp/simple.el	Sun Aug 08 07:41:41 1993 +0000
+++ b/lisp/simple.el	Sun Aug 08 07:47:33 1993 +0000
@@ -630,9 +630,6 @@
       (error "No further undo information"))
   (setq pending-undo-list (primitive-undo count pending-undo-list)))
 
-(defvar last-shell-command "")
-(defvar last-shell-command-on-region "")
-
 (defvar shell-command-history nil
   "History list for some commands that read shell commands.")
 
@@ -643,8 +640,9 @@
 Optional second arg non-nil (prefix arg, if interactive)
 means insert output in current buffer after point (leave mark after it).
 This cannot be done asynchronously."
-  (interactive (list (read-string "Shell command: " last-shell-command)
-		     current-prefix-arg nil nil 'shell-command-history))
+  (interactive (list (read-from-minibuffer "Shell command: "
+					   nil nil nil 'shell-command-history)
+		     current-prefix-arg))
   (if flag
       (progn (barf-if-buffer-read-only)
 	     (push-mark)
@@ -738,9 +736,8 @@
 or output is inserted in the current buffer then `*Shell Command Output*' is
 deleted." 
   (interactive (list (region-beginning) (region-end)
-		     (read-string "Shell command on region: "
-				  last-shell-command-on-region
-				  nil nil 'shell-command-history)
+		     (read-from-minibuffer "Shell command on region: "
+					   nil nil nil 'shell-command-history)
 		     current-prefix-arg
 		     (prefix-numeric-value current-prefix-arg)))
   (if flag