mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Improve buffer name default for C-u M-x shell.
* shell.el (shell): For C-u M-x shell, use an inactive shell buffer as the default. Fixes: debbugs:1975
This commit is contained in:
parent
a8b733a519
commit
a813fe3fb8
@ -1,3 +1,8 @@
|
||||
2012-11-30 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* shell.el (shell): For C-u M-x shell, use an inactive shell
|
||||
buffer as the default (Bug#1975).
|
||||
|
||||
2012-11-30 Yuriy Vostrikov <delamonpansie@gmail.com> (tiny change)
|
||||
|
||||
* vc/vc-git.el (vc-git-command): Disable the pager (Bug#6137).
|
||||
|
@ -671,7 +671,12 @@ Otherwise, one argument `-i' is passed to the shell.
|
||||
(and current-prefix-arg
|
||||
(prog1
|
||||
(read-buffer "Shell buffer: "
|
||||
(generate-new-buffer-name "*shell*"))
|
||||
;; If the current buffer is an inactive
|
||||
;; shell buffer, use it as the default.
|
||||
(if (and (eq major-mode 'shell-mode)
|
||||
(null (get-buffer-process (current-buffer))))
|
||||
(buffer-name)
|
||||
(generate-new-buffer-name "*shell*")))
|
||||
(if (file-remote-p default-directory)
|
||||
;; It must be possible to declare a local default-directory.
|
||||
;; FIXME: This can't be right: it changes the default-directory
|
||||
|
Loading…
Reference in New Issue
Block a user