changeset 4374:1a64d641cea4

(shell-command-history): New variable. (shell-command, shell-command-on-region): Use it.
author Richard M. Stallman <rms@gnu.org>
date Sat, 31 Jul 1993 06:10:44 +0000
parents 02a515f35abc
children ebf146cb7720
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat Jul 31 05:55:52 1993 +0000
+++ b/lisp/simple.el	Sat Jul 31 06:10:44 1993 +0000
@@ -633,6 +633,9 @@
 (defvar last-shell-command "")
 (defvar last-shell-command-on-region "")
 
+(defvar shell-command-history nil
+  "History list for some commands that read shell commands.")
+
 (defun shell-command (command &optional flag)
   "Execute string COMMAND in inferior shell; display output, if any.
 If COMMAND ends in ampersand, execute it asynchronously.
@@ -641,7 +644,7 @@
 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))
+		     current-prefix-arg nil nil 'shell-command-history))
   (if flag
       (progn (barf-if-buffer-read-only)
 	     (push-mark)
@@ -736,7 +739,8 @@
 deleted." 
   (interactive (list (region-beginning) (region-end)
 		     (read-string "Shell command on region: "
-				  last-shell-command-on-region)
+				  last-shell-command-on-region
+				  nil nil 'shell-command-history)
 		     current-prefix-arg
 		     (prefix-numeric-value current-prefix-arg)))
   (if flag