[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52063: 28.0.60; Confusing presentation of lambda
From: |
Filipp Gunbin |
Subject: |
bug#52063: 28.0.60; Confusing presentation of lambda |
Date: |
Wed, 24 Nov 2021 19:40:16 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) |
On 24/11/2021 16:38 +0200, Eli Zaretskii wrote:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: 52063@debbugs.gnu.org, monnier@iro.umontreal.ca
>> Date: Wed, 24 Nov 2021 14:31:22 +0100
>>
>> If you put
>>
>> (lambda () 1)
>>
>> into *scratch* and then `C-u C-x C-e' it'll spit put
>>
>> (closure (t) nil 1)
>>
>> Because that's what that form evaluates to in lexically bound buffers.
>> `lambda' is no longer self-evaluating, and hasn't been for a few years.
>>
>> (But I guess it's pretty recent that *scratch* defaults to lexical.)
>>
>> And it's the same with
>>
>> (lambda ()
>> (setq flyspell-generic-check-word-p
>> 'mail-mode-flyspell-verify))
>>
>> of course.
>
> I'm asking why we are doing this. IT IS CONFUSING!!!
But you're creating normal lambda here, and under lex-bind it will
become a closure, to keep its lexical environment together with it. In
your case there's nothing in lex environment, so that's it.
I just realized that I don't have lex-binding turned on in .emacs, and
because of that my customized hooks look "good", but I wonder: what is
the recommended binding mode for .emacs? Dynamic or lexical? With
lexical, all customizations would start to look as your example.
- bug#52063: 28.0.60; Confusing presentation of lambda, (continued)
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eli Zaretskii, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eli Zaretskii, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eli Zaretskii, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Jim Porter, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Jim Porter, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eduardo Ochs, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda,
Filipp Gunbin <=
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Filipp Gunbin, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eli Zaretskii, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Eli Zaretskii, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Stefan Monnier, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Gregory Heytings, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Filipp Gunbin, 2021/11/24
- bug#52063: 28.0.60; Confusing presentation of lambda, Michael Heerdegen, 2021/11/25