From a9594ce3b1a68ed4ab825cba983fe8019d90f1e8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 24 Sep 1994 04:52:10 +0000 Subject: [PATCH] (shell-command, shell-command-on-region): Make "*Shell Command Output*" non-read-only. --- lisp/simple.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 0ced4f6787d..7d46eede3af 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -701,6 +701,7 @@ This cannot be done asynchronously." (error "Shell command in progress"))) (save-excursion (set-buffer buffer) + (setq buffer-read-only nil) (erase-buffer) (display-buffer buffer) (setq default-directory directory) @@ -788,7 +789,8 @@ deleted." ;; If the input is the same buffer as the output, ;; delete everything but the specified region, ;; then replace that region with the output. - (progn (delete-region end (point-max)) + (progn (setq buffer-read-only nil) + (delete-region end (point-max)) (delete-region (point-min) start) (call-process-region (point-min) (point-max) shell-file-name t t nil @@ -797,6 +799,7 @@ deleted." ;; Clear the output buffer, then run the command with output there. (save-excursion (set-buffer buffer) + (setq buffer-read-only nil) (erase-buffer)) (call-process-region start end shell-file-name nil buffer nil -- 2.39.5