Use pop-to-buffer-same-window for shell
* lisp/progmodes/project.el (project-shell): Behave the same way as 'M-x project-eshell'. * lisp/shell.el (shell): Behave the same way as 'M-x eshell'. * etc/NEWS: Add news entry describing the change. * lisp/tutorial.el: Use lexical-binding.
This commit is contained in:
parent
3cbf92323c
commit
70b64e0d04
3 changed files with 6 additions and 2 deletions
4
etc/NEWS
4
etc/NEWS
|
@ -2300,6 +2300,10 @@ since the latter uses 'M-s' as a prefix key of the search prefix map.
|
|||
** 'vc-print-branch-log' shows the change log for BRANCH from its root
|
||||
directory instead of the default directory.
|
||||
|
||||
---
|
||||
** 'project-shell' and 'shell' now use 'pop-to-buffer-same-window'.
|
||||
This is to keep the same behavior as Eshell.
|
||||
|
||||
|
||||
* Incompatible Lisp Changes in Emacs 28.1
|
||||
|
||||
|
|
|
@ -911,7 +911,7 @@ if one already exists."
|
|||
"-shell*"))
|
||||
(shell-buffer (get-buffer default-project-shell-name)))
|
||||
(if (and shell-buffer (not current-prefix-arg))
|
||||
(pop-to-buffer shell-buffer)
|
||||
(pop-to-buffer-same-window shell-buffer)
|
||||
(shell (generate-new-buffer-name default-project-shell-name)))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -743,7 +743,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 buffer)
|
||||
(pop-to-buffer-same-window buffer)
|
||||
|
||||
(with-connection-local-variables
|
||||
;; On remote hosts, the local `shell-file-name' might be useless.
|
||||
|
|
Loading…
Add table
Reference in a new issue