diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-08-24 00:55:52 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-08-24 00:55:52 +0000 |
commit | a14f49341b14f3496add74cc8f95d1411dd808c0 (patch) | |
tree | dc87c61cf5034ae2222b1a19c0c7dac72f084ddc /lisp | |
parent | 5dd5ac3bf1c56342b3ab193971f936d4ccee3dec (diff) | |
download | emacs-a14f49341b14f3496add74cc8f95d1411dd808c0.tar.gz |
(shell-command-on-region): Don't delete current buffer.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/simple.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index fc0a7fc8069..8dc5fa1af74 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -771,8 +771,9 @@ deleted." (and interactive (push-mark)) (call-process-region start end shell-file-name t t nil "-c" command) - (if (get-buffer "*Shell Command Output*") - (kill-buffer "*Shell Command Output*")) + (let ((shell-buffer (get-buffer "*Shell Command Output*"))) + (and shell-buffer (not (eq shell-buffer (current-buffer))) + (kill-buffer shell-buffer))) (and interactive swap (exchange-point-and-mark))) ;; No prefix argument: put the output in a temp buffer, ;; replacing its entire contents. |