guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] local-eval, local-compile, and the-environment (v3)


From: David Kastrup
Subject: Re: [PATCH] local-eval, local-compile, and the-environment (v3)
Date: Mon, 16 Jan 2012 10:34:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> (define current-module
>>   (let ((top-level (the-environment)))
>>     (lambda () (eval '(the-environment) top-level))))
>
> Some more notes about the above code (changing `eval' ==> `local-eval'):
>
> * (local-eval '(the-environment) <environment>) is a no-op: it always
>   returns the same environment that was passed in, so there's no point
>   in doing it.

I think this was based on the "the current module is part of the
environment, but local-eval does not change (current-module)" mantra
which I interpreted in a confused manner.  The interesting thing is that
it is the _lexically_ current module that is part of the environment,
and inside of local-eval, this may well differ from the _actually_
current module as given by (current-module).

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]