aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-02-27 23:03:34 +0000
committerKim F. Storm2002-02-27 23:03:34 +0000
commit9a98fa641d6d3389d644272d0751d61f778486df (patch)
tree5290845cca7f6e1e7e41b4ad9f37000dd0c86855
parent458a481004ec000bd9028d0659ba0f47dad98240 (diff)
downloademacs-9a98fa641d6d3389d644272d0751d61f778486df.tar.gz
emacs-9a98fa641d6d3389d644272d0751d61f778486df.zip
(shell-command-on-region): Report non-zero exit
status in mode line instead of buffer.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el13
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3814ef2262b..f979bcfcc25 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-02-28 Kim F. Storm <storm@cua.dk>
2
3 * simple.el (shell-command-on-region): Report non-zero exit
4 status in mode line instead of buffer.
5
12002-02-27 Richard M. Stallman <rms@gnu.org> 62002-02-27 Richard M. Stallman <rms@gnu.org>
2 7
3 * comint.el (comint-preoutput-filter-functions): Doc fix. 8 * comint.el (comint-preoutput-filter-functions): Doc fix.
diff --git a/lisp/simple.el b/lisp/simple.el
index 6a0808c2cd6..676264dc31a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1475,16 +1475,13 @@ specifies the value of ERROR-BUFFER."
1475 nil shell-command-switch command))) 1475 nil shell-command-switch command)))
1476 (setq success (and exit-status (equal 0 exit-status))) 1476 (setq success (and exit-status (equal 0 exit-status)))
1477 ;; Report the output. 1477 ;; Report the output.
1478 (with-current-buffer buffer
1479 (setq mode-line-process
1480 (if (not success)
1481 (concat (format " - Exit [%d]" exit-status)))))
1478 (if (with-current-buffer buffer (> (point-max) (point-min))) 1482 (if (with-current-buffer buffer (> (point-max) (point-min)))
1479 ;; There's some output, display it 1483 ;; There's some output, display it
1480 (progn 1484 (display-message-or-buffer buffer)
1481 (if (not success)
1482 (with-current-buffer buffer
1483 (save-excursion
1484 (goto-char (point-max))
1485 (insert (format "...Shell command failed with code %d"
1486 exit-status)))))
1487 (display-message-or-buffer buffer))
1488 ;; No output; error? 1485 ;; No output; error?
1489 (let ((output 1486 (let ((output
1490 (if (and error-file 1487 (if (and error-file