emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Location of init files for M-x shell.


From: Michaël Cadilhac
Subject: Re: Location of init files for M-x shell.
Date: Mon, 04 Dec 2006 14:16:32 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux)

Richard Stallman <address@hidden> writes:

> I think this is a good change, but before we install it,
> you need to change the manuals, etc/NEWS, and anything else
> that describes these names.  Would you like to write that?

Okey, here attached.  As I was grepping the whole thing, I've seen
that cmuscheme has the same `problem'.  I've modified it too (see NEWS
diff).

Index: lisp/cmuscheme.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/cmuscheme.el,v
retrieving revision 1.42
diff -c -r1.42 cmuscheme.el
*** lisp/cmuscheme.el   6 Feb 2006 14:33:32 -0000       1.42
--- lisp/cmuscheme.el   4 Dec 2006 12:35:02 -0000
***************
*** 244,250 ****
  If there is a process already running in `*scheme*', switch to that buffer.
  With argument, allows you to edit the command line (default is value
  of `scheme-program-name').
! If a file `~/.emacs_SCHEMENAME' exists, it is given as initial input.
  Note that this may lose due to a timing error if the Scheme processor
  discards input when it starts up.
  Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook'
--- 244,251 ----
  If there is a process already running in `*scheme*', switch to that buffer.
  With argument, allows you to edit the command line (default is value
  of `scheme-program-name').
! If the file `~/.emacs_SCHEMENAME' or `~/.emacs.d/init_SCHEMENAME.scm' exists,
! it is given as initial input.
  Note that this may lose due to a timing error if the Scheme processor
  discards input when it starts up.
  Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook'
***************
*** 268,279 ****
    "Return the name of the start file corresponding to PROG.
  Search in the directories \"~\" and \"~/.emacs.d\", in this
  order.  Return nil if no start file found."
!   (let* ((name (concat ".emacs_" (file-name-nondirectory prog)))
!          (start-file (concat "~/" name)))
      (if (file-exists-p start-file)
          start-file
!       (let ((start-file (concat "~/.emacs.d/" name)))
!         (and (file-exists-p start-file) start-file)))))
  
  (defun scheme-send-region (start end)
    "Send the current region to the inferior Scheme process."
--- 269,280 ----
    "Return the name of the start file corresponding to PROG.
  Search in the directories \"~\" and \"~/.emacs.d\", in this
  order.  Return nil if no start file found."
!   (let ((progname (file-name-nondirectory prog))
!       (start-file (concat "~/.emacs_" progname))
!       (alt-start-file (concat "~/.emacs.d/init_" progname ".scm")))
      (if (file-exists-p start-file)
          start-file
!       (and (file-exists-p alt-start-file) alt-start-file))))
  
  (defun scheme-send-region (start end)
    "Send the current region to the inferior Scheme process."
Index: lisp/shell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/shell.el,v
retrieving revision 1.143
diff -c -r1.143 shell.el
*** lisp/shell.el       15 Oct 2006 20:42:10 -0000      1.143
--- lisp/shell.el       4 Dec 2006 12:35:03 -0000
***************
*** 521,529 ****
  Program used comes from variable `explicit-shell-file-name',
   or (if that is nil) from the ESHELL environment variable,
   or else from SHELL if there is no ESHELL.
! If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
!  (Note that this may lose due to a timing error if the shell
!   discards input when it starts up.)
  The buffer is put in Shell mode, giving commands for sending input
  and controlling the subjobs of the shell.  See `shell-mode'.
  See also the variable `shell-prompt-pattern'.
--- 521,529 ----
  Program used comes from variable `explicit-shell-file-name',
   or (if that is nil) from the ESHELL environment variable,
   or else from SHELL if there is no ESHELL.
! If a file `~/.emacs_SHELLNAME' exists, or `~/.emacs.d/init_SHELLNAME.sh',
! it is given as initial input (Note that this may lose due to a timing
! error if the shell discards input when it starts up).
  The buffer is put in Shell mode, giving commands for sending input
  and controlling the subjobs of the shell.  See `shell-mode'.
  See also the variable `shell-prompt-pattern'.
***************
*** 556,563 ****
           (name (file-name-nondirectory prog))
           (startfile (concat "~/.emacs_" name))
           (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!       (if (not (file-exists-p startfile))
!         (setq startfile (concat "~/.emacs.d/.emacs_" name)))
        (apply 'make-comint-in-buffer "shell" buffer prog
             (if (file-exists-p startfile) startfile)
             (if (and xargs-name (boundp xargs-name))
--- 556,563 ----
           (name (file-name-nondirectory prog))
           (startfile (concat "~/.emacs_" name))
           (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!       (unless (file-exists-p startfile)
!       (setq startfile (concat "~/.emacs.d/init_" name ".sh")))
        (apply 'make-comint-in-buffer "shell" buffer prog
             (if (file-exists-p startfile) startfile)
             (if (and xargs-name (boundp xargs-name))
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10400
diff -c -0 -r1.10400 ChangeLog
*** lisp/ChangeLog      4 Dec 2006 10:24:04 -0000       1.10400
--- lisp/ChangeLog      4 Dec 2006 12:35:15 -0000
***************
*** 0 ****
--- 1,7 ----
+ 2006-12-04  Michaël Cadilhac  <address@hidden>
+ 
+       * cmuscheme.el (run-scheme, scheme-start-file): Search the start
+       file in ~/.emacs.d as `init_SCHEMENAME.scm' instead.
+       * shell.el (shell): Search the start file in ~/.emacs.d as
+       `init_SHELLNAME.sh' instead.
+ 
Index: etc/NEWS
===================================================================
RCS file: /sources/emacs/emacs/etc/NEWS,v
retrieving revision 1.1409
diff -c -r1.1409 NEWS
*** etc/NEWS    1 Dec 2006 13:36:26 -0000       1.1409
--- etc/NEWS    4 Dec 2006 12:38:55 -0000
***************
*** 235,242 ****
  +++
  ** Init file changes
  If the init file ~/.emacs does not exist, Emacs will try
! ~/.emacs.d/init.el or ~/.emacs.d/init.elc.  You can also put the shell
! init file .emacs_SHELL under ~/.emacs.d.
  
  +++
  ** Emacs now reads the standard abbrevs file ~/.abbrev_defs
--- 235,242 ----
  +++
  ** Init file changes
  If the init file ~/.emacs does not exist, Emacs will try
! ~/.emacs.d/init.el or ~/.emacs.d/init.elc.  Likewise, if the shell init file
! ~/.emacs_SHELL is not found, Emacs will try ~/.emacs.d/init_SHELL.sh.
  
  +++
  ** Emacs now reads the standard abbrevs file ~/.abbrev_defs
***************
*** 2162,2170 ****
  *** Emacs now offers to start Scheme if the user tries to
  evaluate a Scheme expression but no Scheme subprocess is running.
  
! *** If a file `.emacs_NAME' (where NAME is the name of the Scheme interpreter)
! exists in the user's home directory or in ~/.emacs.d, its
! contents are sent to the Scheme subprocess upon startup.
  
  *** There are new commands to instruct the Scheme interpreter to trace
  procedure calls (`scheme-trace-procedure') and to expand syntactic forms
--- 2162,2170 ----
  *** Emacs now offers to start Scheme if the user tries to
  evaluate a Scheme expression but no Scheme subprocess is running.
  
! *** If the file ~/.emacs_NAME or ~/.emacs.d/init_NAME.scm (where NAME
! is the name of the Scheme interpreter) exists, its contents are sent
! to the Scheme subprocess upon startup.
  
  *** There are new commands to instruct the Scheme interpreter to trace
  procedure calls (`scheme-trace-procedure') and to expand syntactic forms
Index: etc/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/etc/ChangeLog,v
retrieving revision 1.476
diff -c -0 -r1.476 ChangeLog
*** etc/ChangeLog       1 Dec 2006 17:43:30 -0000       1.476
--- etc/ChangeLog       4 Dec 2006 12:39:02 -0000
***************
*** 0 ****
--- 1,7 ----
+ 2006-12-04  Michaël Cadilhac  <address@hidden>
+ 
+       * NEWS (Changes to cmuscheme): Mention the alternative for
+       `~/.emacs_SCHEMEPROG' which is `~/.emacs.d/init_SCHEMEPROG.scm'.
+       (Init file changes): Same for `~/.emacs_SHELL' versus 
+       `~/.emacs.d/init_SHELL.sh'.
+ 
Index: man/anti.texi
===================================================================
RCS file: /sources/emacs/emacs/man/anti.texi,v
retrieving revision 1.39
diff -c -r1.39 anti.texi
*** man/anti.texi       22 Nov 2006 17:13:41 -0000      1.39
--- man/anti.texi       4 Dec 2006 12:39:24 -0000
***************
*** 66,72 ****
  We have standardized on one location for the user init file: the file
  named @file{.emacs} in your home directory.  Emacs will not look for
  the init file in @file{~/.emacs.d/init.el}.  Similarly, don't try
! putting @file{.emacs_SHELL} in @file{~/.emacs.d}; Emacs won't find it.
  
  @item
  Emacs will not read @file{~/.abbrev_defs} automatically.  If you want
--- 66,73 ----
  We have standardized on one location for the user init file: the file
  named @file{.emacs} in your home directory.  Emacs will not look for
  the init file in @file{~/.emacs.d/init.el}.  Similarly, don't try
! putting @file{.emacs_SHELL} as @file{init_SHELL.sh} in
! @file{~/.emacs.d}; Emacs won't find it.
  
  @item
  Emacs will not read @file{~/.abbrev_defs} automatically.  If you want
Index: man/faq.texi
===================================================================
RCS file: /sources/emacs/emacs/man/faq.texi,v
retrieving revision 1.100
diff -c -r1.100 faq.texi
*** man/faq.texi        7 Oct 2006 00:14:09 -0000       1.100
--- man/faq.texi        4 Dec 2006 12:39:24 -0000
***************
*** 2761,2767 ****
  endif
  @end example
  
! Or put this in your @file{.emacs_tcsh} file:
  
  @example
  unset edit
--- 2761,2767 ----
  endif
  @end example
  
! Or put this in your @file{.emacs_tcsh} or @file{~/.emacs.d/init_tcsh.sh} file:
  
  @example
  unset edit
Index: man/misc.texi
===================================================================
RCS file: /sources/emacs/emacs/man/misc.texi,v
retrieving revision 1.94
diff -c -r1.94 misc.texi
*** man/misc.texi       18 Nov 2006 21:00:16 -0000      1.94
--- man/misc.texi       4 Dec 2006 12:39:25 -0000
***************
*** 478,484 ****
  @file{~/address@hidden as input, if it exists, where
  @var{shellname} is the name of the file that the shell was loaded
  from.  For example, if you use bash, the file sent to it is
! @file{~/.emacs_bash}.
  
    To specify a coding system for the shell, you can use the command
  @kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}.  You can
--- 478,485 ----
  @file{~/address@hidden as input, if it exists, where
  @var{shellname} is the name of the file that the shell was loaded
  from.  For example, if you use bash, the file sent to it is
! @file{~/.emacs_bash}.  If this file is not found, Emacs tries to fallback
! on @file{~/.emacs.d/address@hidden
  
    To specify a coding system for the shell, you can use the command
  @kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}.  You can
Index: man/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/man/ChangeLog,v
retrieving revision 1.1138
diff -c -0 -r1.1138 ChangeLog
*** man/ChangeLog       1 Dec 2006 13:23:01 -0000       1.1138
--- man/ChangeLog       4 Dec 2006 12:39:34 -0000
***************
*** 0 ****
--- 1,7 ----
+ 2006-12-04  Michaël Cadilhac  <address@hidden>
+ 
+       * misc.texi (Interactive Shell): Mention the alternative to
+       `~/.emacs_SHELLNAME', which is `~/.emacs.d/init_SHELLNAME.sh'.
+       * faq.texi (^M in the shell buffer): Ditto.
+       * anti.texi (Antinews): Ditto.
+ 
TIA !

-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac     |  ... KVim is cited in the talk.        |
 |         Epita/LRDE Promo 2007     |   "I can't tell if I am more sorry     |
 |  http://michael.cadilhac.name     |        for vim or for KDE."            |
 `--JID: address@hidden'          -- RMS                   -  --'

Attachment: pgp9vMIVNySYd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]