changeset 43581:d7536b0977ac

(shell-command-on-region): Report non-zero exit status in mode line instead of buffer.
author Kim F. Storm <storm@cua.dk>
date Wed, 27 Feb 2002 23:02:02 +0000
parents a163de064942
children 29f87eca9974
files lisp/simple.el
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Wed Feb 27 19:32:12 2002 +0000
+++ b/lisp/simple.el	Wed Feb 27 23:02:02 2002 +0000
@@ -1475,16 +1475,13 @@
 					 nil shell-command-switch command)))
 	  (setq success (and exit-status (equal 0 exit-status)))
 	  ;; Report the output.
+	  (with-current-buffer buffer
+	    (setq mode-line-process 
+		  (if (not success)
+		    (concat (format " - Exit [%d]" exit-status)))))
 	  (if (with-current-buffer buffer (> (point-max) (point-min)))
 	      ;; There's some output, display it
-	      (progn
-		(if (not success)
-		    (with-current-buffer buffer
-		      (save-excursion
-			(goto-char (point-max))
-			(insert (format "...Shell command failed with code %d"
-					exit-status)))))
-		(display-message-or-buffer buffer))
+	      (display-message-or-buffer buffer)
 	    ;; No output; error?
 	    (let ((output
 		   (if (and error-file