Commit 519bfec4 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(shell): Use pop-to-buffer.

(same-window-buffer-names): Add *shell* to the list.
parent 4d235ac7
...@@ -365,15 +365,21 @@ Otherwise, one argument `-i' is passed to the shell. ...@@ -365,15 +365,21 @@ Otherwise, one argument `-i' is passed to the shell.
"/bin/sh")) "/bin/sh"))
(name (file-name-nondirectory prog)) (name (file-name-nondirectory prog))
(startfile (concat "~/.emacs_" name)) (startfile (concat "~/.emacs_" name))
(xargs-name (intern-soft (concat "explicit-" name "-args")))) (xargs-name (intern-soft (concat "explicit-" name "-args")))
(set-buffer (apply 'make-comint "shell" prog shell-buffer)
(if (file-exists-p startfile) startfile) (save-excursion
(if (and xargs-name (boundp xargs-name)) (set-buffer (apply 'make-comint "shell" prog
(symbol-value xargs-name) (if (file-exists-p startfile) startfile)
'("-i")))) (if (and xargs-name (boundp xargs-name))
(shell-mode) (symbol-value xargs-name)
(switch-to-buffer (current-buffer))) '("-i"))))
(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 ;;; Directory tracking
;;; =========================================================================== ;;; ===========================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment