Commit a9594ce3 authored by Richard M. Stallman's avatar Richard M. Stallman

(shell-command, shell-command-on-region):

Make "*Shell Command Output*" non-read-only.
parent 11bcd7d4
...@@ -701,6 +701,7 @@ This cannot be done asynchronously." ...@@ -701,6 +701,7 @@ This cannot be done asynchronously."
(error "Shell command in progress"))) (error "Shell command in progress")))
(save-excursion (save-excursion
(set-buffer buffer) (set-buffer buffer)
(setq buffer-read-only nil)
(erase-buffer) (erase-buffer)
(display-buffer buffer) (display-buffer buffer)
(setq default-directory directory) (setq default-directory directory)
...@@ -788,7 +789,8 @@ deleted." ...@@ -788,7 +789,8 @@ deleted."
;; If the input is the same buffer as the output, ;; If the input is the same buffer as the output,
;; delete everything but the specified region, ;; delete everything but the specified region,
;; then replace that region with the output. ;; 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) (delete-region (point-min) start)
(call-process-region (point-min) (point-max) (call-process-region (point-min) (point-max)
shell-file-name t t nil shell-file-name t t nil
...@@ -797,6 +799,7 @@ deleted." ...@@ -797,6 +799,7 @@ deleted."
;; Clear the output buffer, then run the command with output there. ;; Clear the output buffer, then run the command with output there.
(save-excursion (save-excursion
(set-buffer buffer) (set-buffer buffer)
(setq buffer-read-only nil)
(erase-buffer)) (erase-buffer))
(call-process-region start end shell-file-name (call-process-region start end shell-file-name
nil buffer nil nil buffer nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment