diff options
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 294c9792f39..c33a5997070 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -2677,17 +2677,17 @@ This function is more useful than \\[tex-buffer] when you need the | |||
| 2677 | The last line of the buffer is displayed on | 2677 | The last line of the buffer is displayed on |
| 2678 | line LINE of the window, or centered if LINE is nil." | 2678 | line LINE of the window, or centered if LINE is nil." |
| 2679 | (interactive "P") | 2679 | (interactive "P") |
| 2680 | (let ((tex-shell (get-buffer "*tex-shell*")) | 2680 | (let ((tex-shell (get-buffer "*tex-shell*"))) |
| 2681 | (window)) | ||
| 2682 | (if (null tex-shell) | 2681 | (if (null tex-shell) |
| 2683 | (message "No TeX output buffer") | 2682 | (message "No TeX output buffer") |
| 2684 | (setq window (display-buffer tex-shell display-tex-shell-buffer-action)) | 2683 | (when-let ((window |
| 2685 | (with-selected-window window | 2684 | (display-buffer tex-shell display-tex-shell-buffer-action))) |
| 2686 | (bury-buffer tex-shell) | 2685 | (with-selected-window window |
| 2687 | (goto-char (point-max)) | 2686 | (bury-buffer tex-shell) |
| 2688 | (recenter (if linenum | 2687 | (goto-char (point-max)) |
| 2689 | (prefix-numeric-value linenum) | 2688 | (recenter (if linenum |
| 2690 | (/ (window-height) 2))))))) | 2689 | (prefix-numeric-value linenum) |
| 2690 | (/ (window-height) 2)))))))) | ||
| 2691 | 2691 | ||
| 2692 | (defcustom tex-print-file-extension ".dvi" | 2692 | (defcustom tex-print-file-extension ".dvi" |
| 2693 | "The TeX-compiled file extension for viewing and printing. | 2693 | "The TeX-compiled file extension for viewing and printing. |