comparison lisp/shell.el @ 74446:cc077225d97f

(shell): Search the start file in ~/.emacs.d as `init_SHELLNAME.sh' instead.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 05 Dec 2006 14:21:56 +0000
parents b2e5081b9320
children 984d68f669d4 f1d13e615070
comparison
equal deleted inserted replaced
74445:d26696d58462 74446:cc077225d97f
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")))