From: Richard M. Stallman Date: Sat, 31 Jul 1993 06:10:44 +0000 (+0000) Subject: (shell-command-history): New variable. X-Git-Tag: emacs-19.34~11477 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=009ef4024db6cc9360da4f5cbf8d5438782800ce;p=emacs.git (shell-command-history): New variable. (shell-command, shell-command-on-region): Use it. --- 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." (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 @@ 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)) + current-prefix-arg nil nil 'shell-command-history)) (if flag (progn (barf-if-buffer-read-only) (push-mark) @@ -736,7 +739,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) + last-shell-command-on-region + nil nil 'shell-command-history) current-prefix-arg (prefix-numeric-value current-prefix-arg))) (if flag