diff options
| author | Richard M. Stallman | 1995-03-12 09:39:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-12 09:39:49 +0000 |
| commit | 519bfec49611bbe4d4b7ea642c755c70ba014f1d (patch) | |
| tree | 018e88371d65297d300a9a256fe753771cef919b /lisp/shell.el | |
| parent | 4d235ac73036faae7be6e249cca544c6f4b35764 (diff) | |
| download | emacs-519bfec49611bbe4d4b7ea642c755c70ba014f1d.tar.gz emacs-519bfec49611bbe4d4b7ea642c755c70ba014f1d.zip | |
(shell): Use pop-to-buffer.
(same-window-buffer-names): Add *shell* to the list.
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 9f07194d305..3d60af3f6d1 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -365,15 +365,21 @@ Otherwise, one argument `-i' is passed to the shell. | |||
| 365 | "/bin/sh")) | 365 | "/bin/sh")) |
| 366 | (name (file-name-nondirectory prog)) | 366 | (name (file-name-nondirectory prog)) |
| 367 | (startfile (concat "~/.emacs_" name)) | 367 | (startfile (concat "~/.emacs_" name)) |
| 368 | (xargs-name (intern-soft (concat "explicit-" name "-args")))) | 368 | (xargs-name (intern-soft (concat "explicit-" name "-args"))) |
| 369 | (set-buffer (apply 'make-comint "shell" prog | 369 | shell-buffer) |
| 370 | (if (file-exists-p startfile) startfile) | 370 | (save-excursion |
| 371 | (if (and xargs-name (boundp xargs-name)) | 371 | (set-buffer (apply 'make-comint "shell" prog |
| 372 | (symbol-value xargs-name) | 372 | (if (file-exists-p startfile) startfile) |
| 373 | '("-i")))) | 373 | (if (and xargs-name (boundp xargs-name)) |
| 374 | (shell-mode) | 374 | (symbol-value xargs-name) |
| 375 | (switch-to-buffer (current-buffer))) | 375 | '("-i")))) |
| 376 | (switch-to-buffer "*shell*"))) | 376 | (setq shell-buffer (current-buffer)) |
| 377 | (shell-mode)) | ||
| 378 | (pop-to-buffer shell-buffer)) | ||
| 379 | (pop-to-buffer "*shell*"))) | ||
| 380 | |||
| 381 | ;;; Don't do this when shell.el is loaded, only while dumping. | ||
| 382 | ;;;###autoload (add-hook 'same-window-buffer-names "*shell*") | ||
| 377 | 383 | ||
| 378 | ;;; Directory tracking | 384 | ;;; Directory tracking |
| 379 | ;;; =========================================================================== | 385 | ;;; =========================================================================== |