[gnu.emacs] shell-command-on-buffer

worley@EDDIE.MIT.EDU (Dale Worley) (10/18/88)

This is to go along with shell-command and shell-command-on-region:

(defun shell-command-on-buffer (command &optional flag)
  "Execute string COMMAND in inferior shell with buffer as input;
display output (if any) in temp buffer;
Prefix arg means replace the buffer with it."
  (interactive "sShell command (on buffer): \nP")
  (shell-command-on-region (point-min) (point-max) command flag t))

Dale