# HG changeset patch # User Richard M. Stallman # Date 795001189 0 # Node ID 5abad4aec8e02167c5b0b64e1c11f2823643c6d0 # Parent 4ef3ef45089f1344d01da539ff6de5e4eef59b9f (shell): Use pop-to-buffer. (same-window-buffer-names): Add *shell* to the list. diff -r 4ef3ef45089f -r 5abad4aec8e0 lisp/shell.el --- a/lisp/shell.el Sun Mar 12 09:15:08 1995 +0000 +++ b/lisp/shell.el Sun Mar 12 09:39:49 1995 +0000 @@ -365,15 +365,21 @@ "/bin/sh")) (name (file-name-nondirectory prog)) (startfile (concat "~/.emacs_" name)) - (xargs-name (intern-soft (concat "explicit-" name "-args")))) - (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*"))) + (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")))) + (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 ;;; ===========================================================================