* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function in shell command output buffers (bug#46151).
(start-process-shell-command "Shell" buffer command)))
(setq mode-line-process '(":%s"))
(shell-mode)
+ (setq revert-buffer-function
+ (lambda (&rest _)
+ (async-shell-command command (current-buffer))))
(set-process-sentinel proc #'shell-command-sentinel)
;; Use the comint filter for proper handling of
;; carriage motion (see comint-inhibit-carriage-motion).
buffer))))
;; Report the output.
(with-current-buffer buffer
+ (setq revert-buffer-function
+ (lambda (&rest _)
+ (shell-command command)))
(setq mode-line-process
(cond ((null exit-status)
" - Error")