Mercurial > emacs
comparison lisp/shell.el @ 90718:f1d13e615070
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 523-544)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 168-171)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 07 Dec 2006 04:14:14 +0000 |
parents | 7eeafaaa9eab cc077225d97f |
children | 6588c6259dfb |
comparison
equal
deleted
inserted
replaced
90717:06937e972ad0 | 90718:f1d13e615070 |
---|---|
1 ;;; shell.el --- specialized comint.el for running the shell | 1 ;;; shell.el --- specialized comint.el for running the shell |
2 | 2 |
3 ;; Copyright (C) 1988, 1993, 1994, 1995, 1996, 1997, 2000, | 3 ;; Copyright (C) 1988, 1993, 1994, 1995, 1996, 1997, 2000, 2001, |
4 ;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 ;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 6 ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
7 ;; Simon Marshall <simon@gnu.org> | 7 ;; Simon Marshall <simon@gnu.org> |
8 ;; Maintainer: FSF | 8 ;; Maintainer: FSF |
519 If BUFFER exists but shell process is not running, make new shell. | 519 If BUFFER exists but shell process is not running, make new shell. |
520 If BUFFER exists and shell process is running, just switch to BUFFER. | 520 If BUFFER exists and shell process is running, just switch to BUFFER. |
521 Program used comes from variable `explicit-shell-file-name', | 521 Program used comes from variable `explicit-shell-file-name', |
522 or (if that is nil) from the ESHELL environment variable, | 522 or (if that is nil) from the ESHELL environment variable, |
523 or else from SHELL if there is no ESHELL. | 523 or else from SHELL if there is no ESHELL. |
524 If a file `~/.emacs_SHELLNAME' exists, it is given as initial input | 524 If a file `~/.emacs_SHELLNAME' exists, or `~/.emacs.d/init_SHELLNAME.sh', |
525 (Note that this may lose due to a timing error if the shell | 525 it is given as initial input (Note that this may lose due to a timing |
526 discards input when it starts up.) | 526 error if the shell discards input when it starts up). |
527 The buffer is put in Shell mode, giving commands for sending input | 527 The buffer is put in Shell mode, giving commands for sending input |
528 and controlling the subjobs of the shell. See `shell-mode'. | 528 and controlling the subjobs of the shell. See `shell-mode'. |
529 See also the variable `shell-prompt-pattern'. | 529 See also the variable `shell-prompt-pattern'. |
530 | 530 |
531 To specify a coding system for converting non-ASCII characters | 531 To specify a coding system for converting non-ASCII characters |
554 (let* ((prog (or explicit-shell-file-name | 554 (let* ((prog (or explicit-shell-file-name |
555 (getenv "ESHELL") shell-file-name)) | 555 (getenv "ESHELL") shell-file-name)) |
556 (name (file-name-nondirectory prog)) | 556 (name (file-name-nondirectory prog)) |
557 (startfile (concat "~/.emacs_" name)) | 557 (startfile (concat "~/.emacs_" name)) |
558 (xargs-name (intern-soft (concat "explicit-" name "-args")))) | 558 (xargs-name (intern-soft (concat "explicit-" name "-args")))) |
559 (if (not (file-exists-p startfile)) | 559 (unless (file-exists-p startfile) |
560 (setq startfile (concat "~/.emacs.d/.emacs_" name))) | 560 (setq startfile (concat "~/.emacs.d/init_" name ".sh"))) |
561 (apply 'make-comint-in-buffer "shell" buffer prog | 561 (apply 'make-comint-in-buffer "shell" buffer prog |
562 (if (file-exists-p startfile) startfile) | 562 (if (file-exists-p startfile) startfile) |
563 (if (and xargs-name (boundp xargs-name)) | 563 (if (and xargs-name (boundp xargs-name)) |
564 (symbol-value xargs-name) | 564 (symbol-value xargs-name) |
565 '("-i"))) | 565 '("-i"))) |