Mercurial > hg > xemacs-beta
diff lisp/process.el @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 4f79e16b1112 |
children | d883f39b8495 |
line wrap: on
line diff
--- a/lisp/process.el Mon Aug 13 11:01:58 2007 +0200 +++ b/lisp/process.el Mon Aug 13 11:03:08 2007 +0200 @@ -245,7 +245,6 @@ (let ((buffer (get-buffer-create (or output-buffer "*Shell Command Output*"))) (success nil) - (exit-status nil) (directory default-directory)) (unwind-protect (if (eq buffer (current-buffer)) @@ -255,10 +254,9 @@ (progn (setq buffer-read-only nil) (delete-region (max start end) (point-max)) (delete-region (point-min) (max start end)) - (setq exit-status - (call-process-region (point-min) (point-max) - shell-file-name t t nil - shell-command-switch command)) + (call-process-region (point-min) (point-max) + shell-file-name t t nil + shell-command-switch command) (setq success t)) ;; Clear the output buffer, ;; then run the command with output there. @@ -268,10 +266,9 @@ ;; XEmacs change (setq default-directory directory) (erase-buffer)) - (setq exit-status - (call-process-region start end shell-file-name - nil buffer nil - shell-command-switch command)) + (call-process-region start end shell-file-name + nil buffer nil + shell-command-switch command) (setq success t)) ;; Report the amount of output. (let ((lines (save-excursion @@ -283,9 +280,7 @@ (if success (display-message 'command - (if (eql exit-status 0) - "(Shell command succeeded with no output)" - "(Shell command failed with no output)"))) + "(Shell command completed with no output)")) (kill-buffer buffer)) ((and success (= lines 1)) (message "%s" @@ -350,7 +345,7 @@ process as a string" ;; by "William G. Dubuque" <wgd@zurich.ai.mit.edu> (with-output-to-string - (call-process shell-file-name nil t nil shell-command-switch command))) + (call-process shell-file-name nil t nil "-c" command))) (defalias 'shell-command-to-string 'exec-to-string)