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

Re: error with EVAL and LOAD



    From: johnson@Yale-MBUILD
    To: bug-t
    Subject: error with EVAL and LOAD
    
    Evaluating the form
    
            (EVAL '(LOAD "foo.t") *Foo-Env*)
    
    in *SCRATCH-ENV* causes foo.t to be loaded into *SCRATCH-ENV* instead of
    *FOO-ENV*.
    
This is not a bug.  LOAD is a procedure and therefore has no idea
what environment it was called from.  The 3rd edition of the manual
does not say what environment is uses; that was a documentation bug.
If given one argument it uses the current value of (REPL-ENV).  However,
one-argument LOAD is now de-released, and if you check your 4th edition
T manual you'll see that you need to supply an environment as a second
argument:
  
            (LOAD "foo.t" *Foo-Env*)

One-argument LOAD will continue to work for compatibility, at least
for a while.