help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: let-bind a varlist only known at run time


From: Roland Winkler
Subject: Re: let-bind a varlist only known at run time
Date: Thu, 13 Jul 2017 01:09:38 +0200

On Wed Jul 12 2017 Michael Heerdegen wrote:
> > If var-list is the VARLIST for the let form, you should also use
> > var-list to construct the alist that becomes the 2nd arg LEXICAL of
> > eval.  I believe, then it should not matter whether you have lexical
> > binding on or off (untested!)
> 
> I don't think it's that simple: BINDS is unevaluated: it's a list of the
> form ((SYMBOL EXPRESSION) ...).  We would need to evaluate the bindings
> twice (once to calculate the environment for `eval', and the second time
> when evaluating the constructed form), which is unacceptable.

I agree that the expressions need to be evaluated only once.
Currently cl-progv uses the quoted values of the expresssions for
the let binding.  I expect that instead, these quoted values should
be used twice, for the let binding and for `eval'.

I played with this idea, but I couldn't find a solution within the
finite amount of time I spent with this problem.

> > So is this a bug in cl-progv?  (I checked: this macro ignores the
> > 2nd arg LEXICAL of eval.)
> 
> I think it's a bug, it's now filed as #27674.

Thanks, I'll watch it.



reply via email to

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