diff options
| author | Richard M. Stallman | 2001-06-13 15:26:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-06-13 15:26:29 +0000 |
| commit | fd344fb75f1e0bca5b208d01b9a04c2ba0ad09b8 (patch) | |
| tree | dc5be7519c2d946f4d3f7063000bf91bae5ee850 /lisp | |
| parent | 3d00585eb4d5a5567402ab3b6f7a8b9647185523 (diff) | |
| download | emacs-fd344fb75f1e0bca5b208d01b9a04c2ba0ad09b8.tar.gz emacs-fd344fb75f1e0bca5b208d01b9a04c2ba0ad09b8.zip | |
(shell-command-on-region): Never kill the *Shell Command Output* buffer.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/simple.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index a58f8003bac..4cde8642cf1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1434,9 +1434,10 @@ specifies the value of ERROR-BUFFER." | |||
| 1434 | (list t error-file) | 1434 | (list t error-file) |
| 1435 | t) | 1435 | t) |
| 1436 | nil shell-command-switch command)) | 1436 | nil shell-command-switch command)) |
| 1437 | (let ((shell-buffer (get-buffer "*Shell Command Output*"))) | 1437 | ;;; It is rude to delete a buffer which the command is not using. |
| 1438 | (and shell-buffer (not (eq shell-buffer (current-buffer))) | 1438 | ;;; (let ((shell-buffer (get-buffer "*Shell Command Output*"))) |
| 1439 | (kill-buffer shell-buffer))) | 1439 | ;;; (and shell-buffer (not (eq shell-buffer (current-buffer))) |
| 1440 | ;;; (kill-buffer shell-buffer))) | ||
| 1440 | ;; Don't muck with mark unless REPLACE says we should. | 1441 | ;; Don't muck with mark unless REPLACE says we should. |
| 1441 | (and replace swap (exchange-point-and-mark))) | 1442 | (and replace swap (exchange-point-and-mark))) |
| 1442 | ;; No prefix argument: put the output in a temp buffer, | 1443 | ;; No prefix argument: put the output in a temp buffer, |
| @@ -1485,8 +1486,7 @@ specifies the value of ERROR-BUFFER." | |||
| 1485 | (< 0 (nth 7 (file-attributes error-file)))) | 1486 | (< 0 (nth 7 (file-attributes error-file)))) |
| 1486 | "(Shell command %sed with some error output)" | 1487 | "(Shell command %sed with some error output)" |
| 1487 | "(Shell command %sed with no output)") | 1488 | "(Shell command %sed with no output)") |
| 1488 | (if (equal 0 exit-status) "succeed" "fail")) | 1489 | (if (equal 0 exit-status) "succeed" "fail")))))) |
| 1489 | (kill-buffer buffer))))) | ||
| 1490 | 1490 | ||
| 1491 | (when (and error-file (file-exists-p error-file)) | 1491 | (when (and error-file (file-exists-p error-file)) |
| 1492 | (if (< 0 (nth 7 (file-attributes error-file))) | 1492 | (if (< 0 (nth 7 (file-attributes error-file))) |