aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorSam Steingold2014-12-23 11:44:45 -0500
committerSam Steingold2014-12-23 11:44:45 -0500
commite55a467ec0f758c311d358ceb7d66a8a7d9482c3 (patch)
tree479284eb669c994fe4739cd0fd75e0670adf1354 /lisp/shell.el
parent29c5e2cea22f909af7d33b290ca0eb23c5ad6c00 (diff)
downloademacs-e55a467ec0f758c311d358ceb7d66a8a7d9482c3.tar.gz
emacs-e55a467ec0f758c311d358ceb7d66a8a7d9482c3.zip
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."
308 (const :tag "on" t)) 308 (const :tag "on" t))
309 :group 'shell) 309 :group 'shell)
310 310
311(defcustom shell-display-buffer-actions display-buffer-base-action
312 "The `display-buffer' actions for the `*shell*' buffer."
313 :type display-buffer--action-custom-type
314 :risky t
315 :version "25.1"
316 :group 'shell)
317
311(defvar shell-dirstack nil 318(defvar shell-dirstack nil
312 "List of directories saved by pushd in this buffer's shell. 319 "List of directories saved by pushd in this buffer's shell.
313Thus, this does not include the shell's current directory.") 320Thus, this does not include the shell's current directory.")
@@ -718,7 +725,7 @@ Otherwise, one argument `-i' is passed to the shell.
718 725
719 ;; The buffer's window must be correctly set when we call comint (so 726 ;; The buffer's window must be correctly set when we call comint (so
720 ;; that comint sets the COLUMNS env var properly). 727 ;; that comint sets the COLUMNS env var properly).
721 (pop-to-buffer-same-window buffer) 728 (pop-to-buffer buffer shell-display-buffer-actions)
722 (unless (comint-check-proc buffer) 729 (unless (comint-check-proc buffer)
723 (let* ((prog (or explicit-shell-file-name 730 (let* ((prog (or explicit-shell-file-name
724 (getenv "ESHELL") shell-file-name)) 731 (getenv "ESHELL") shell-file-name))