Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!caip!think!mit-eddie!mit-trillian!rlk From: rlk@mit-trillian.MIT.EDU (Robert L Krawitz) Newsgroups: net.emacs Subject: Re: uEmacs 3.7 doesn't handle multiple rc files Message-ID: <1080@mit-trillian.MIT.EDU> Date: Tue, 2-Sep-86 10:46:59 EDT Article-I.D.: mit-tril.1080 Posted: Tue Sep 2 10:46:59 1986 Date-Received: Tue, 2-Sep-86 21:18:37 EDT Reply-To: rlk@athena.MIT.EDU Organization: MIT Project Athena Lines: 45 In article <1182@uw-june> context@uw-june (Ronald Blanford) writes: >In article <12800011@duncan>, lawrence@duncan.UUCP writes: >> >> The Idea here is that sometimes you want your personal >> .emacsrc file to OVERRIDE the system one. It would not be possible to >> do that if I had coded it the way you asked. On the other hand, a >> single line like: >> >> execute-file "/usr/local/.emacsrc" >> >> or something similar will allow your .emacsrc file to execute >> the system file. >> > >You can override the system file simply by having the home file execute >last with the appropriate resetting commands. The way it now stands, >unless the user knows to insert the "execute-file" command, as soon as >he creates his own .emacsrc to customize some aspect of emacs, the >behavior may change drastically due to system defaults no longer being >present. > >It would be better just to execute the system file, and have that one >contain a line like: execute-file "~/.emacsrc", although this may not >work so well on non-Unix systems. > >-- Ron This sort of thing is risky, particularly in editors like gnuemacs (yeah, I know the discussion so far isn't about that, but the same principle applies), since some code can permanently clobber parts of the system. Another hack that can be done is to have the system-wide startup file check for the appropriate personal file, and if it doesn't exist, create one that loads a default startup file. I. e. (if (not (file-attributes "~/.emacs")) (progn (set-buffer (find-file-noselect (substitute-in-file-name "~/.emacs"))) (insert "(load \"/usr/mit/lib/gnuemacs/lisp/default.el\"\n")) (save-buffer))) (load "/usr/mit/lib/gnuemacs/lisp/default.el")) or whatever is needed in any other flavor of emacs. -- Robert^Z