home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4080 < prev    next >
Encoding:
Text File  |  1992-09-10  |  2.6 KB  |  63 lines

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