1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

(shell): Use pop-to-buffer.

(same-window-buffer-names): Add *shell* to the list.
This commit is contained in:
Richard M. Stallman 1995-03-12 09:39:49 +00:00
parent 4d235ac730
commit 519bfec496

View File

@ -365,15 +365,21 @@ Otherwise, one argument `-i' is passed to the shell.
"/bin/sh"))
(name (file-name-nondirectory prog))
(startfile (concat "~/.emacs_" name))
(xargs-name (intern-soft (concat "explicit-" name "-args"))))
(xargs-name (intern-soft (concat "explicit-" name "-args")))
shell-buffer)
(save-excursion
(set-buffer (apply 'make-comint "shell" prog
(if (file-exists-p startfile) startfile)
(if (and xargs-name (boundp xargs-name))
(symbol-value xargs-name)
'("-i"))))
(shell-mode)
(switch-to-buffer (current-buffer)))
(switch-to-buffer "*shell*")))
(setq shell-buffer (current-buffer))
(shell-mode))
(pop-to-buffer shell-buffer))
(pop-to-buffer "*shell*")))
;;; Don't do this when shell.el is loaded, only while dumping.
;;;###autoload (add-hook 'same-window-buffer-names "*shell*")
;;; Directory tracking
;;; ===========================================================================