Subject: bug#46722: test-map-into fails

From: Stefan Monnier <[email-masked]>
Date: Wed, 05 Jan 2022 11:38:03 -0500

>> Does the patch below help?

No, it doesn't because I see now that we already fixed this bug by
binding `lexical-binding` (just a bit further above).

> I don't see why it would if this doesn't work:
>
> (let ((lexical-binding t))
>   (funcall
>    (funcall
>     (backquote
>      (lambda (arg)
>        (lambda () arg)))
>     t)))

The effect of `lexical-binding` is different from what you think.
It applies to the moment a sexp passes from being "data" to the moment
it is labeled as "code", not to the moment the code is executed
(otherwise we couldn't compile the code of functions ahead of time, not
knowing which value of `lexical-binding` would be active when the code
will be executed).

> While I remain leery of the fast and loose scoping here, it was but a red
> herring.

Indeed,

        Stefan