summaryrefslogtreecommitdiff
path: root/lisp/progmodes/project.el
diff options
context:
space:
mode:
authorSam Steingold <sdsg@amazon.com>2021-12-28 17:27:41 -0500
committerSam Steingold <sdsg@amazon.com>2021-12-28 17:28:49 -0500
commit18b680cfd177e877991be2bd70ead628bbdc0aa0 (patch)
tree0d926a816f1a60e5836221192549854155740b33 /lisp/progmodes/project.el
parent6e52becfbe2a33c025b8c4838b3c8f06ba5a6fb8 (diff)
downloademacs-18b680cfd177e877991be2bd70ead628bbdc0aa0.tar.gz
emacs-18b680cfd177e877991be2bd70ead628bbdc0aa0.tar.bz2
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/progmodes/project.el')
-rw-r--r--lisp/progmodes/project.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 3b634471ace..62dba7b3933 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1015,7 +1015,7 @@ if one already exists."
(default-project-shell-name (project-prefixed-buffer-name "shell"))
(shell-buffer (get-buffer default-project-shell-name)))
(if (and shell-buffer (not current-prefix-arg))
- (pop-to-buffer-same-window shell-buffer)
+ (pop-to-buffer shell-buffer display-comint-buffer-action)
(shell (generate-new-buffer-name default-project-shell-name)))))
;;;###autoload
@@ -1031,7 +1031,7 @@ if one already exists."
(eshell-buffer-name (project-prefixed-buffer-name "eshell"))
(eshell-buffer (get-buffer eshell-buffer-name)))
(if (and eshell-buffer (not current-prefix-arg))
- (pop-to-buffer-same-window eshell-buffer)
+ (pop-to-buffer eshell-buffer display-comint-buffer-action)
(eshell t))))
;;;###autoload