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

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

bug#40671: [DOC] modify literal objects


From: Michael Heerdegen
Subject: bug#40671: [DOC] modify literal objects
Date: Wed, 29 Apr 2020 01:52:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Paul Eggert <eggert@cs.ucla.edu> 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.





reply via email to

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