Function: mh-exec-cmd-error
mh-exec-cmd-error is a byte-compiled function defined in mh-e.el.gz.
Signature
(mh-exec-cmd-error ENV COMMAND &rest ARGS)
Documentation
In environment ENV, execute mh-command COMMAND with ARGS.
ENV is nil or a string of space-separated "var=value" elements. Signals an error if process does not complete successfully.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-e.el.gz
(defun mh-exec-cmd-error (env command &rest args)
"In environment ENV, execute mh-command COMMAND with ARGS.
ENV is nil or a string of space-separated \"var=value\" elements.
Signals an error if process does not complete successfully."
(with-current-buffer (get-buffer-create mh-temp-buffer)
(erase-buffer)
(let ((process-environment process-environment))
;; XXX: We should purge the list that split-string returns of empty
;; strings. This can happen in XEmacs if leading or trailing spaces
;; are present.
(dolist (elem (if (stringp env) (split-string env " ") ()))
(push elem process-environment))
(mh-handle-process-error
command (apply #'call-process (expand-file-name command mh-progs)
nil t nil (mh-list-to-string args))))))