Function: TeX-BibTeX-sentinel

TeX-BibTeX-sentinel is a byte-compiled function defined in tex.el.

Signature

(TeX-BibTeX-sentinel PROCESS NAME)

Documentation

Cleanup TeX output buffer after running BibTeX.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
;; should go into latex.el? --pg
(defun TeX-BibTeX-sentinel (_process _name)
  "Cleanup TeX output buffer after running BibTeX."
  (goto-char (point-max))
  (cond
   ;; Check whether BibTeX reports any warnings or errors.
   ((re-search-backward (concat
                         "^(There \\(?:was\\|were\\) \\([0-9]+\\) "
                         "\\(warnings?\\|error messages?\\))")
                        nil t)
    ;; Tell the user their number so that she sees whether the
    ;; situation is getting better or worse.
    (message (concat "BibTeX finished with %s %s. "
                     "Type `%s' to display output.")
             (match-string 1) (match-string 2)
             (substitute-command-keys
              "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
   (t
    (message (concat "BibTeX finished successfully. "
                     "Run LaTeX again to get citations right."))))
  ;; In any case, run the default next command.
  (setq TeX-command-next TeX-command-default))