home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / emacs / help / 3967 < prev    next >
Encoding:
Text File  |  1992-09-02  |  2.3 KB  |  70 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!decwrl!deccrl!news.crl.dec.com!pa.dec.com!engage.pko.dec.com!newsdaemon
  3. From: eje@irenaeus.mlo.dec.com (Eric James Ewanco)
  4. Subject: Re: another .emacs problem
  5. Message-ID: <1992Sep2.193157.15462@engage.pko.dec.com>
  6. Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
  7. Reply-To: ewanco@kalvin.enet.dec.com
  8. Organization: Digital Equipment Corporation
  9. References: <1992Sep1.182617.15356@engage.pko.dec.com> <1992Sep1.195517.18971@ncar.ucar.edu> <1992Sep2.154319.15711@den.mmc.com>
  10. Distribution: usa
  11. Date: Wed, 2 Sep 1992 19:31:57 GMT
  12. Lines: 56
  13.  
  14.  
  15. I discovered why my .emacs file was functioning correctly when evaluated in a
  16. buffer but not upon startup.  Well, I take that back, I discovered how to fix
  17. it, I'm not sure I understand why it did fix it, though.
  18.  
  19. Someone mailed me this suggestion: 
  20. ----------
  21. From:    DECWRL::"ange@hplb.hpl.hp.com" "Andy Norman"  2-SEP-1992 05:00:10.94
  22. To:    kalvin::ewanco
  23. CC:    
  24. Subj:    Re: another .emacs problem
  25.  
  26. Hi Eric.
  27.  
  28. Recently in gnu.emacs.help, you wrote:
  29.  
  30. > Unfortunately I have this problem that whenever I bring up .emacs, I get an
  31. > "Error in init file".
  32.  
  33. My guess is that you are doing something that is either terminal or
  34. window-system specific.
  35.  
  36. Look for any lines that attempt to access X11, mouse, termianl-specific
  37. variables.  Wrap them in a function, then assign that function to either
  38. term-setup-hook or window-setup-hook... for example:
  39.  
  40.   (defun eric-setup-terminal ()
  41.     (global-set-key "\[&34" 'foobar)
  42.     (define-key x-mouse-map 'button-up 'ignore)
  43.     ...)
  44.  
  45.   (setq term-setup-hook (function eric-setup-terminal))
  46.  
  47.                     -- ange -- <><
  48.  
  49.                     ange@hplb.hpl.hp.com
  50.   
  51. -----------------
  52. This worked perfectly.  I took all my X windows stuff, prefaced it with
  53. (defun eje-setup-X11 ()
  54.  
  55. and terminated it with another parenthesis (that's it), and then added after it
  56. (setq window-setup-hook (function eje-setup-X11))
  57.  
  58. and it work superbly.
  59.  
  60. Thanks, Andy.
  61.  
  62. Eric
  63. --
  64. /=============================================================================\
  65. | Eric Ewanco - Software Engineer     For the rash and outrageous opinions ex-|
  66. | Digital Equipment Corp, Maynard MA  pressed herein I alone am responsible;  |
  67. | ewanco@kalvin.enet.dec.com          they do not belong to DIGITAL(TM).      |
  68. \==============================- 2 Th 2:15 -==================================/
  69.  
  70.