summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2014-12-23 11:44:45 -0500
committerSam Steingold <sds@gnu.org>2014-12-23 11:44:45 -0500
commite55a467ec0f758c311d358ceb7d66a8a7d9482c3 (patch)
tree479284eb669c994fe4739cd0fd75e0670adf1354 /lisp/shell.el
parent29c5e2cea22f909af7d33b290ca0eb23c5ad6c00 (diff)
downloademacs-e55a467ec0f758c311d358ceb7d66a8a7d9482c3.tar.gz
Use a new user option instead of hard-coding shell display.
* lisp/shell.el (shell-display-buffer-actions): New user option. (shell): Pass it to `pop-to-buffer' instead of hard-coding `pop-to-buffer-same-window'.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 506f944094b..480d04a03eb 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -308,6 +308,13 @@ for Shell mode only."
(const :tag "on" t))
:group 'shell)
+(defcustom shell-display-buffer-actions display-buffer-base-action
+ "The `display-buffer' actions for the `*shell*' buffer."
+ :type display-buffer--action-custom-type
+ :risky t
+ :version "25.1"
+ :group 'shell)
+
(defvar shell-dirstack nil
"List of directories saved by pushd in this buffer's shell.
Thus, this does not include the shell's current directory.")
@@ -718,7 +725,7 @@ Otherwise, one argument `-i' is passed to the shell.
;; The buffer's window must be correctly set when we call comint (so
;; that comint sets the COLUMNS env var properly).
- (pop-to-buffer-same-window buffer)
+ (pop-to-buffer buffer shell-display-buffer-actions)
(unless (comint-check-proc buffer)
(let* ((prog (or explicit-shell-file-name
(getenv "ESHELL") shell-file-name))