diff options
| author | Sam Steingold | 2021-12-28 17:27:41 -0500 |
|---|---|---|
| committer | Sam Steingold | 2021-12-28 17:28:49 -0500 |
| commit | 18b680cfd177e877991be2bd70ead628bbdc0aa0 (patch) | |
| tree | 0d926a816f1a60e5836221192549854155740b33 /lisp/textmodes | |
| parent | 6e52becfbe2a33c025b8c4838b3c8f06ba5a6fb8 (diff) | |
| download | emacs-18b680cfd177e877991be2bd70ead628bbdc0aa0.tar.gz emacs-18b680cfd177e877991be2bd70ead628bbdc0aa0.zip | |
Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'
* lisp/window.el (display-comint-buffer-action): New `defcustom`,
defaults to 'display-buffer-same-window' for backward compatibility.
* lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass
'display-comint-buffer-action' to 'pop-to-buffer' instead
of using 'pop-to-buffer-same-window'.
* lisp/eshell/eshell.el (eshell): Likewise.
* lisp/shell.el (shell): Likewise.
* lisp/org/ol-eshell.el (org-eshell-open): Likewise.
* lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise.
* lisp/progmodes/project.el (project-shell, project-eshell): Likewise.
* lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default)
(tex-recenter-output-buffer): Pass 'display-comint-buffer-action'
to 'pop-to-buffer'.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 5fba93c76eb..0c112b2ecf5 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -2037,7 +2037,7 @@ In the tex shell buffer this command behaves like `comint-send-input'." | |||
| 2037 | 2037 | ||
| 2038 | (defun tex-display-shell () | 2038 | (defun tex-display-shell () |
| 2039 | "Make the TeX shell buffer visible in a window." | 2039 | "Make the TeX shell buffer visible in a window." |
| 2040 | (display-buffer (tex-shell-buf)) | 2040 | (display-buffer (tex-shell-buf) display-comint-buffer-action) |
| 2041 | (tex-recenter-output-buffer nil)) | 2041 | (tex-recenter-output-buffer nil)) |
| 2042 | 2042 | ||
| 2043 | (defun tex-shell-sentinel (proc _msg) | 2043 | (defun tex-shell-sentinel (proc _msg) |
| @@ -2441,7 +2441,7 @@ Only applies the FSPEC to the args part of FORMAT." | |||
| 2441 | (if cmds (tex-format-cmd (caar cmds) fspec)))))) | 2441 | (if cmds (tex-format-cmd (caar cmds) fspec)))))) |
| 2442 | 2442 | ||
| 2443 | (defun tex-cmd-doc-view (file) | 2443 | (defun tex-cmd-doc-view (file) |
| 2444 | (pop-to-buffer (find-file-noselect file))) | 2444 | (pop-to-buffer (find-file-noselect file) display-comint-buffer-action)) |
| 2445 | 2445 | ||
| 2446 | (defun tex-compile (dir cmd) | 2446 | (defun tex-compile (dir cmd) |
| 2447 | "Run a command CMD on current TeX buffer's file in DIR." | 2447 | "Run a command CMD on current TeX buffer's file in DIR." |
| @@ -2698,7 +2698,7 @@ line LINE of the window, or centered if LINE is nil." | |||
| 2698 | (window)) | 2698 | (window)) |
| 2699 | (if (null tex-shell) | 2699 | (if (null tex-shell) |
| 2700 | (message "No TeX output buffer") | 2700 | (message "No TeX output buffer") |
| 2701 | (setq window (display-buffer tex-shell)) | 2701 | (setq window (display-buffer tex-shell display-comint-buffer-action)) |
| 2702 | (with-selected-window window | 2702 | (with-selected-window window |
| 2703 | (bury-buffer tex-shell) | 2703 | (bury-buffer tex-shell) |
| 2704 | (goto-char (point-max)) | 2704 | (goto-char (point-max)) |