Function: TeX-previous-error

TeX-previous-error is an interactive and byte-compiled function defined in tex.el.

Signature

(TeX-previous-error ARG)

Documentation

Find the previous error in the TeX output buffer.

Prefix ARG says how many error messages to move backward (or forward, if negative).

This works only with TeX commands and if the TeX-parse-all-errors(var)/TeX-parse-all-errors(fun) variable is non-nil.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-previous-error (arg)
  "Find the previous error in the TeX output buffer.

Prefix ARG says how many error messages to move backward (or
forward, if negative).

This works only with TeX commands and if the
`TeX-parse-all-errors' variable is non-nil."
  (interactive "p")
  (if (or (null (TeX-active-buffer))
          (eq 'compilation-mode (with-current-buffer TeX-command-buffer
                                  major-mode)))
      (previous-error arg)

    (let ((parse-function (TeX-get-parse-function)))
      (if (and TeX-parse-all-errors (equal parse-function #'TeX-parse-TeX))
          ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
          ;; `TeX-parse-TeX' we can move backward in the errors.
          (TeX-parse-TeX (- arg) nil)
        ;; XXX: moving backward in the errors hasn't yet been implemented for
        ;; other parsing functions.
        (error "Jumping to previous error not supported")))))