home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!psinntp!snoopy!short
- From: short@asf.com (Lee Short)
- Subject: Re: another .emacs problem
- Message-ID: <1992Sep9.180440.5710@asf.com>
- Organization: ASF
- References: <1992Sep1.195517.18971@ncar.ucar.edu> <1992Sep2.154319.15711@den.mmc.com> <1992Sep2.193157.15462@engage.pko.dec.com>
- Distribution: usa
- Date: Wed, 9 Sep 1992 18:04:40 GMT
- Lines: 51
-
- In article <1992Sep2.193157.15462@engage.pko.dec.com> ewanco@kalvin.enet.dec.com writes:
- >
- >I discovered why my .emacs file was functioning correctly when evaluated in a
- >buffer but not upon startup. Well, I take that back, I discovered how to fix
- >it, I'm not sure I understand why it did fix it, though.
- >
- >Someone mailed me this suggestion:
- >----------
- >From: DECWRL::"ange@hplb.hpl.hp.com" "Andy Norman" 2-SEP-1992 05:00:10.94
- >...
- >My guess is that you are doing something that is either terminal or
- >window-system specific.
- >
- >Look for any lines that attempt to access X11, mouse, termianl-specific
- >variables. Wrap them in a function, then assign that function to either
- >term-setup-hook or window-setup-hook... for example:
- > ...
- >-----------------
- >This worked perfectly. ...
-
-
- My educated guess is that this has to do with the *order* of execution
- of the three files Emacs loads upon startup. Your local .emacs is
- loaded first. Next is loaded the terminal init file. Last is loaded
- the local default init file (default.el or .elc or some such name).
- It is likely that your .emacs contains code which is dependent upon
- the loading of the local default init file or the terminal init file.
- What the above code likely does is to delay the execution of the
- functions in question until these init files are loaded. There is
- another, more direct way to do this (and its also useful if you have
- other reasons for wanting your .emacs loaded after these two files, as
- I do -- specifically, because I want to override some definitions made
- in default.el):
-
- -----
- (load "./term/vt100.el") ; first load the terminal file
- (load "default") ; next load the default init
- (load "~/.my_emacs")
- (setq inhibit-default-init t) ; inhibit loading of default init
- (setq term-file-prefix nil) ; inhibit loading of terminal file
- -----
-
- This is a nearly exact clone of my .emacs. There may be a way to specify
- the terminal file in a generic way, but I don't know it offhand.
-
- Lee
- --
- short@asf.com I'll believe in Virtual Reality when they create
- *NOT* short@xxx.asf.com the first virtual beer.
- Lee Short I speak for none of the many steps in the food chain
- Hughes Training, Inc. between myself and General Motors corporation.
-