Function: TeX-run-format
TeX-run-format is a byte-compiled function defined in tex.el.
Signature
(TeX-run-format NAME COMMAND FILE)
Documentation
Create a process for NAME using COMMAND to format FILE with TeX.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-run-format (name command file)
"Create a process for NAME using COMMAND to format FILE with TeX."
(TeX-run-set-command name command)
(let ((current-master (TeX-master-file))
(buffer (TeX-process-buffer-name file))
(process (TeX-run-command name command file)))
;; Save information in TeX-error-report-switches
;; Initialize error to nil (no error) for current master.
;; Presence of error is reported inside `TeX-TeX-sentinel-check'
;; the current master file is saved because error routines are
;; parsed in other buffers;
(setq TeX-error-report-switches
(plist-put TeX-error-report-switches
'TeX-current-master current-master))
;; reset error to nil (no error)
(setq TeX-error-report-switches
(plist-put TeX-error-report-switches
(intern current-master) nil))
;; Hook to TeX debugger.
(with-current-buffer buffer
(TeX-parse-reset)
(setq TeX-parse-function #'TeX-parse-TeX)
(setq TeX-sentinel-function #'TeX-TeX-sentinel)
(if TeX-process-asynchronous
(progn
;; Updating the mode line.
(setq TeX-current-page "[0]")
(TeX-format-mode-line process)
(set-process-filter process #'TeX-format-filter)))
process)))