home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!cis.ohio-state.edu!e.kth.SE!levitte
- From: levitte@e.kth.SE (Richard Levitte)
- Subject: Re: trying to change load-path before dumping...
- Message-ID: <LEVITTE.92Aug14163330@elixir.e.kth.se>
- Followup-To: gnu.emacs.bug
- Sender: gnulists@ai.mit.edu
- Organization: Royal Institute of Technology, Stockholm
- References: levitte@e.kth.SE (Richard Levitte)
- Date: Fri, 14 Aug 1992 15:33:30 GMT
- Lines: 56
-
- I finally made it! But, boy, is it a kludge...
-
- When you can dump emacs, there are two phases:
-
- - dump-creating phase when the dump file is created
- - session phase this is the usual "phase", when Emacs is used
- for normal editing.
-
- Now, this is what happens with load-path (it is really in C in lread.c,
- but I will express some parts in e-lisp, for simplicity):
-
- In dump-creating phase:
-
- /* PATH_LOADSEARCH is found in paths.h, and in this case, it is
- set to "EMACS_LIBRARY:[LISP];EMACS_LIBRARY:[LOCAL]" */
- load-path = PATH_LOADSEARCH;
-
- (setq load-path (cons "../lisp" load-path))
-
- ;; some time after this, my site-init.el was loaded, and
- ;; did the following:
-
- (setq load-path (nconc load-path '("EMACS_LIBRARY:[LOCAL.GNUS]")))
-
- ;; The result which is saved in the dump-file is that load-path
- ;; is set to ("../lisp" "EMACS_LIBRARY:[LISP]" "EMACS_LIBRARY:[LOCAL]"
- ;; "EMACS_LIBRARY:[LOCAL.GNUS]")
-
- Now, in the session phase:
-
- (if (string= (car load-path) "../lisp") ;;;;; !!!!!!!!!!
- (setq load-path PATH_LOADSEARCH)) ;;;;; !!!!!!!!!!
-
- Now, I would like to know, WHY THE HELL IS IT DONE THIS WAY??????
-
- Well, anyway, to circumvent this bug (yes, IMHO it is a bug!), I put
- the following in site-init.el:
-
- (setq load-path
- (nconc (if (string= (car load-path) "../lisp")
- (cdr load-path)
- load-path)
- "EMACS_LIBRARY:[LOCAL.GNUS]"))
-
- Somewhat a kludge, but it was the only way....
-
- Couldn't this be fixed? Just by taking away the stupid part mentioned above?
-
- --
- !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
- ! Richard Levitte, System manager ! tel: int+46-8-790 64 23 !
- ! Royal Institute of Technology ! fax: int+46-8-791 76 54 !
- ! Department of Teletransmition Theory ! Internet: richard@ttt.kth.se !
- ! S-100 44 Stockholm, Sweden ! !
- !---------------------------------------------------------------------------!
-
-