[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: load defaults



> Date: Wed, 14 Dec 88 11:11 EST 
> From: MURRAY@cs.umass.EDU
>
>  There is no portable way to find out what pathname is currently being
>  loaded.  The portable way to get your desired behavior is simply to
>  define your own load function that will bind *DEFAULT-PATHNAME-DEFAULTS*
>  to the file it is loading before it calls the real load.
>     (defun default-load (input &rest args)
>       (let ((*default-pathname-defaults* (merge-pathnames input)))
>         (apply 'load *default-pathname-defaults* args)))

This is a nice idea, but it doesn't solve my problem.  The user would have
to type in the whole definition before he could use it to load the header
file I referred to.  I want to avoid inconveniencing the user; he should be
able to just start up a fresh Lisp, LOAD a single header file, and have
everything else happen automatically.

I like KMP's proposals.  I like the second one best: have separate
variables for files being loaded and files being compiled, and use them to
maintain a stack so we can see the nesting of loads within files.

-- Dave