Subject: Re: bug#40671: [DOC] modify literal objects

From: Michael Heerdegen <[email-masked]>
Date: Wed, 29 Apr 2020 01:52:16 +0200

Paul Eggert <[email-masked]> writes:

> >   (let ((l (list 1 2 3)))
> >     (funcall (lambda () l)))
> >
> > Has the list become a constant?
>
> No, because the list is not part of the expression that is being evaluated.
> However, something like this could cause trouble:
>
> (let ((l (list 'lambda '(x) '(setcdr l x))))
>   (eval (list l l)))

FWIW, I asked also because `funcall' seems, at least AFAIU, share some
code with `eval', and with lexical-binding on the lambda gets
transformed into something that does include the original list, so the
list becomes part of the evaluated expression.

Michael.