1475 |
nil shell-command-switch command))) |
nil shell-command-switch command))) |
1476 |
(setq success (and exit-status (equal 0 exit-status))) |
(setq success (and exit-status (equal 0 exit-status))) |
1477 |
;; Report the output. |
;; Report the output. |
1478 |
|
(with-current-buffer buffer |
1479 |
|
(setq mode-line-process |
1480 |
|
(if (not success) |
1481 |
|
(concat (format " - Exit [%d]" exit-status))))) |
1482 |
(if (with-current-buffer buffer (> (point-max) (point-min))) |
(if (with-current-buffer buffer (> (point-max) (point-min))) |
1483 |
;; There's some output, display it |
;; There's some output, display it |
1484 |
(progn |
(display-message-or-buffer buffer) |
|
(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)) |
|
1485 |
;; No output; error? |
;; No output; error? |
1486 |
(let ((output |
(let ((output |
1487 |
(if (and error-file |
(if (and error-file |