Function: TeX-parse-TeX
TeX-parse-TeX is a byte-compiled function defined in tex.el.
Signature
(TeX-parse-TeX ARG REPARSE)
Documentation
Find the next error produced by running TeX.
ARG specifies how many error messages to move, when possible; negative means move back to previous error messages.
If REPARSE is non-nil, reparse the output log.
If the file occurs in an included file, the file is loaded (if not already in an Emacs buffer) and the cursor is placed at the error.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-parse-TeX (arg reparse)
"Find the next error produced by running TeX.
ARG specifies how many error messages to move, when possible;
negative means move back to previous error messages.
If REPARSE is non-nil, reparse the output log.
If the file occurs in an included file, the file is loaded (if not
already in an Emacs buffer) and the cursor is placed at the error."
(let ((old-buffer (current-buffer))
max-index item)
;; Switch to the output buffer.
(with-current-buffer (TeX-active-buffer)
(if reparse
(TeX-parse-reset reparse))
(if TeX-parse-all-errors
(progn
(setq arg (or arg 1)
max-index (length TeX-error-list))
;; This loop is needed to skip ignored warnings, when
;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore
;; warnings.
(while (null (zerop arg))
(setq TeX-error-last-visited
;; Increase or decrease `TeX-error-last-visited'
;; depending on the sign of `arg'. Note: `signum'
;; is a function from `cl' library, do not be
;; tempted to use it.
(if (> arg 0)
(1+ TeX-error-last-visited)
(1- TeX-error-last-visited))
item (nth TeX-error-last-visited TeX-error-list))
;; Increase or decrease `arg' only if the warning isn't to
;; be skipped, or `TeX-error-last-visited' has dropped
;; below 0 with a negative `arg'.
(if (or (and (< arg 0)
(< TeX-error-last-visited 0))
(not (TeX-error-list-skip-warning-p (nth 0 item)
(nth 10 item))))
;; Note: `signum' is a function from `cl' library, do
;; not be tempted to use it.
(setq arg (if (> arg 0)
(1- arg)
(1+ arg)))))
(if (< TeX-error-last-visited -1)
(setq TeX-error-last-visited -1))
(cond ((or (null item)
(< TeX-error-last-visited 0))
(if (> TeX-error-last-visited max-index)
(setq TeX-error-last-visited max-index))
(message "No more errors.")
(beep)
(TeX-pop-to-buffer old-buffer))
(t
(apply #'TeX-find-display-help item))))
(goto-char TeX-error-point)
(TeX-parse-error old-buffer)))))