Andreas Hinze said:

> Thanks for the example.
> This is so clever that i'm not shure that i got it. What i think is:
>
>   (write-line "(setq *my-data* #.*my-data*)" stream)
>
> is read by the compiler and due to the '#.' the second *my-data* is
> replaced by the value of *mydata* in the environment before the compiler
> dumps out the form. That's why a make-load-form method must exist for
> all contained data (so compiler knows how to dump it).
>
> Is this right ?

Yes, this is what happens.  BTW the line should probably read

(write-line "(setq *my-data* '#.*my-data*)" stream)

so that it also works when *my-data* is bound to a list or a symbol,
which aren't self-evaluating.

Regs, Pierre.

-- 
Pierre R. Mai <[EMAIL PROTECTED]>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein




Reply via email to