changeset 4488:b0a70d8d9af4

(shell-command, shell-command-on-region): Fix bugs in previous change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 08 Aug 1993 07:47:33 +0000
parents 177aaa70734d
children f1fa60176c8d
files lisp/simple.el
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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