1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

; Fix error in 'tex-recenter-output-buffer'

* lisp/textmodes/tex-mode.el (tex-recenter-output-buffer): Check
that 'display-buffer' returned a window, rather than nil, before
selecting it.  (Bug#65762)
This commit is contained in:
Eshel Yaron 2023-09-05 18:58:02 +02:00 committed by Eli Zaretskii
parent d17c5adc05
commit bc56da92d8

View File

@ -2677,17 +2677,17 @@ This function is more useful than \\[tex-buffer] when you need the
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*"))
(window))
(let ((tex-shell (get-buffer "*tex-shell*")))
(if (null tex-shell)
(message "No TeX output buffer")
(setq window (display-buffer tex-shell display-tex-shell-buffer-action))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))
(recenter (if linenum
(prefix-numeric-value linenum)
(/ (window-height) 2)))))))
(when-let ((window
(display-buffer tex-shell display-tex-shell-buffer-action)))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))
(recenter (if linenum
(prefix-numeric-value linenum)
(/ (window-height) 2))))))))
(defcustom tex-print-file-extension ".dvi"
"The TeX-compiled file extension for viewing and printing.