[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suggestion for C-u M-x shell
From: |
Markus Rost |
Subject: |
Suggestion for C-u M-x shell |
Date: |
Mon, 11 Aug 2003 15:33:33 -0400 (EDT) |
To run several shells in Emacs, one uses
C-u M-x shell
which prompts for a buffer name with "*shell*" as default. However
for that name it would be enough to just call M-x shell without a
prefix. What about suggesting a new unused buffer name in the prompt?
That would come in handy for starting a new shell. What do people
think?
Here is a patch for this.
* shell.el (shell): With prefix-arg, suggest a new buffer name.
===Buffer *diff*============================================
cd /home/rost/cvs/emacs/lisp/
diff -c /home/rost/cvs/emacs/lisp/shell.el /tmp/buffer-content-6992R3d
*** /home/rost/cvs/emacs/lisp/shell.el Thu Jun 12 18:20:49 2003
--- /tmp/buffer-content-6992R3d Mon Aug 11 12:43:33 2003
***************
*** 533,539 ****
(interactive
(list
(and current-prefix-arg
! (read-buffer "Shell buffer: " "*shell*"))))
(setq buffer (get-buffer-create (or buffer "*shell*")))
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
--- 533,540 ----
(interactive
(list
(and current-prefix-arg
! (read-buffer "Shell buffer: "
! (generate-new-buffer-name "*shell*")))))
(setq buffer (get-buffer-create (or buffer "*shell*")))
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
Diff finished at Mon Aug 11 12:43:34
============================================================
- Suggestion for C-u M-x shell,
Markus Rost <=