Function: pr-call-process
pr-call-process is a byte-compiled function defined in printing.el.gz.
Signature
(pr-call-process COMMAND &rest ARGS)
Source Code
;; Defined in /usr/src/emacs/lisp/printing.el.gz
(defun pr-call-process (command &rest args)
(let ((buffer (get-buffer-create "*Printing Command Output*"))
(cmd (pr-command command))
status)
(setq args (pr-remove-nil-from-list args))
;; *Printing Command Output* == show command & args
(with-current-buffer buffer
(goto-char (point-max))
(insert (format "%s %S\n" cmd args)))
;; *Printing Command Output* == show any return message from command
(with-file-modes pr-file-modes
(setq status
(condition-case data
(apply #'call-process cmd nil buffer nil args)
((quit error)
(error-message-string data)))))
;; *Printing Command Output* == show exit status
(with-current-buffer buffer
(goto-char (point-max))
(insert (format "Exit status: %s\n\n" status)))
;; message if error status
(if (or (stringp status)
(and (integerp status) (/= status 0)))
(message
"Printing error status: %s (see *Printing Command Output* buffer)"
status))))