From: ··············@googlemail.com
Subject: MAKE-LOAD-FORM environment
Date: 
Message-ID: <296aaa2c-864b-4f6f-87b4-813a90d2be9b@y43g2000hsy.googlegroups.com>
Hi,

I am not completely sure what the environment arg is to be used for.

It seems that often a null-lex-env is passed. The forms returned e.g.
by make-load-form-saving-slots seem to normally reference the obj to
be externalized directly - is it correct that if there was a binding
in the environment for the obj the associated variable could be used
by make-load-form as a symbol instead?

Sorry, if I dont express myself clearly enough...

Thanks for any help,
  Kilian
From: Steven M. Haflich
Subject: Re: MAKE-LOAD-FORM environment
Date: 
Message-ID: <EiK3j.4478$AR7.4218@nlpi070.nbdc.sbc.com>
··············@googlemail.com wrote:
> I am not completely sure what the environment arg is to be used for.
> 
> It seems that often a null-lex-env is passed. The forms returned e.g.
> by make-load-form-saving-slots seem to normally reference the obj to
> be externalized directly - is it correct that if there was a binding
> in the environment for the obj the associated variable could be used
> by make-load-form as a symbol instead?

A make-load-form needs to be processed by the file compiler into some
code that will have the desired result at load time.  The
make-load-form form may depend on constants or (symbol-)macros that
are defined in the compilation environment, but might not be defined
in either the Lisp image that is doing the compilation, or the Lisp
image that is later doing the loading.

The environment argument allows the make-load-form machinery to access
the environment appropriate to the make-load-form form.