aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-31 06:10:44 +0000
committerRichard M. Stallman1993-07-31 06:10:44 +0000
commit009ef4024db6cc9360da4f5cbf8d5438782800ce (patch)
tree8f1641faba7123113206f2538e2f2a8463c6a3a7 /lisp/simple.el
parent2f65feb682856f64e9ea4f755b5f320e674cde2a (diff)
downloademacs-009ef4024db6cc9360da4f5cbf8d5438782800ce.tar.gz
emacs-009ef4024db6cc9360da4f5cbf8d5438782800ce.zip
(shell-command-history): New variable.
(shell-command, shell-command-on-region): Use it.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index c697a4c95d0..bf99a38a11a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -633,6 +633,9 @@ then call `undo-more' one or more times to undo them."
633(defvar last-shell-command "") 633(defvar last-shell-command "")
634(defvar last-shell-command-on-region "") 634(defvar last-shell-command-on-region "")
635 635
636(defvar shell-command-history nil
637 "History list for some commands that read shell commands.")
638
636(defun shell-command (command &optional flag) 639(defun shell-command (command &optional flag)
637 "Execute string COMMAND in inferior shell; display output, if any. 640 "Execute string COMMAND in inferior shell; display output, if any.
638If COMMAND ends in ampersand, execute it asynchronously. 641If COMMAND ends in ampersand, execute it asynchronously.
@@ -641,7 +644,7 @@ Optional second arg non-nil (prefix arg, if interactive)
641means insert output in current buffer after point (leave mark after it). 644means insert output in current buffer after point (leave mark after it).
642This cannot be done asynchronously." 645This cannot be done asynchronously."
643 (interactive (list (read-string "Shell command: " last-shell-command) 646 (interactive (list (read-string "Shell command: " last-shell-command)
644 current-prefix-arg)) 647 current-prefix-arg nil nil 'shell-command-history))
645 (if flag 648 (if flag
646 (progn (barf-if-buffer-read-only) 649 (progn (barf-if-buffer-read-only)
647 (push-mark) 650 (push-mark)
@@ -736,7 +739,8 @@ or output is inserted in the current buffer then `*Shell Command Output*' is
736deleted." 739deleted."
737 (interactive (list (region-beginning) (region-end) 740 (interactive (list (region-beginning) (region-end)
738 (read-string "Shell command on region: " 741 (read-string "Shell command on region: "
739 last-shell-command-on-region) 742 last-shell-command-on-region
743 nil nil 'shell-command-history)
740 current-prefix-arg 744 current-prefix-arg
741 (prefix-numeric-value current-prefix-arg))) 745 (prefix-numeric-value current-prefix-arg)))
742 (if flag 746 (if flag