Function: tex-recenter-output-buffer
tex-recenter-output-buffer is an interactive and byte-compiled
function defined in tex-mode.el.gz.
Signature
(tex-recenter-output-buffer LINENUM)
Documentation
Redisplay buffer of TeX job output so that most recent output can be seen.
The last line of the buffer is displayed on line LINE of the window, or centered if LINE is nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex-recenter-output-buffer (linenum)
"Redisplay buffer of TeX job output so that most recent output can be seen.
The last line of the buffer is displayed on
line LINE of the window, or centered if LINE is nil."
(interactive "P")
(let ((tex-shell (get-buffer "*tex-shell*")))
(if (null tex-shell)
(message "No TeX output buffer")
(when-let* ((window
(display-buffer tex-shell '(display-buffer-in-previous-window
(inhibit-same-window . t)
(category . tex-shell)))))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))
(recenter (if linenum
(prefix-numeric-value linenum)
(/ (window-height) 2))))))))