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

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!mmm.serc.3m.com!mmc.mmmg.com!timbuk.cray.com!hemlock.cray.com!ericdh
  3. From: ericdh@cray.com (Eric D. Hendrickson)
  4. Subject: How do I initialize a variable at start-up, and keep it?
  5. Message-ID: <1992Sep15.110810.24028@hemlock.cray.com>
  6. Lines: 43
  7. Organization: Cray Research, Inc.
  8. Distribution: gnu
  9. Date: 15 Sep 92 11:08:10 CDT
  10.  
  11.  
  12. I am optimizing my .emacs file a little, and I find that when I do M-x
  13. load-file ~/.emacs, its not the same as an initial start-up of Emacs
  14. because my elisp path and auto-mode-alist are already set, thus not
  15. accurately reflecting any holes in my start-up.
  16.  
  17. I would like to make my .emacs such that every time I do a M-x load-file
  18. ~/.emacs, everything starts over fresh.  Such as my load-path, etc.
  19.  
  20. The way I have started is to do something like this:
  21.  
  22. ;;; initialize load-path
  23. ;;;
  24. (if (string-equal 'initial-load-path "")
  25.     (let initial-load-path 'load-path)  ; save for M-x load-path ~/.emacs
  26. )
  27. (setq load-path (cons (concat (getenv "HOME") "/elisp") initial-load-path))
  28.  
  29. The problem with this is that initial-load-path is a void symbol initially,
  30. and there doesn't seem to be a way to initialize it to 'load-path ONLY at
  31. Emacs start-up.
  32.  
  33. Does anybody have a solution for this?  Perhaps there is a completely
  34. better direction than this one to achieve the same purpose.
  35.  
  36. Thanks for any help!
  37.  
  38.                 --eric
  39. (p.s. is there an easier way to append a file to a buffer than reading the
  40. file in (with C-x f) and doing a C-x a to append it?  e.g. manually
  41. appending my .signature to a buffer?)
  42. --
  43. I happen to be a Republican president- ah, the vice president.
  44.         -- Vice President Dan Quayle (Newsweek 4/9/90)
  45.  
  46. Eric D. Hendrickson       Damnit!  I can't stop the heterocyclic declination!
  47. Cray Research, Inc.                                        The game is afoot!
  48. 612/683-5302              ericdh@cray.com                    Eh to desu ne...
  49. -- 
  50. I happen to be a Republican president- ah, the vice president.
  51.         -- Vice President Dan Quayle (Newsweek 4/9/90)
  52.  
  53. Eric D. Hendrickson       Damnit!  I can't stop the heterocyclic declination!
  54.