summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index c9def1bb3f3..6198214abee 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -758,7 +758,7 @@ Make the shell buffer the current buffer, and return it.
(current-buffer)))
;; 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 display-comint-buffer-action)
(with-connection-local-variables
;; On remote hosts, the local `shell-file-name' might be useless.
@@ -785,7 +785,8 @@ Make the shell buffer the current buffer, and return it.
(startfile (concat "~/.emacs_" name))
(xargs-name (intern-soft (concat "explicit-" name "-args"))))
(unless (file-exists-p startfile)
- (setq startfile (concat user-emacs-directory "init_" name ".sh")))
+ (setq startfile (locate-user-emacs-file
+ (concat "init_" name ".sh"))))
(setq-local shell--start-prog (file-name-nondirectory prog))
(apply #'make-comint-in-buffer "shell" buffer prog
(if (file-exists-p startfile) startfile)