From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#52063: 28.0.60; Confusing presentation of lambda Date: Wed, 24 Nov 2021 19:40:16 +0300 Message-ID: References: <83czmqaegb.fsf@gnu.org> <874k82vwe5.fsf@gnus.org> <831r35afde.fsf@gnu.org> <87v90hu36b.fsf@gnus.org> <83v90h8zjw.fsf@gnu.org> <87r1b5u1cl.fsf@gnus.org> <83pmqp8vps.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38153"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: Lars Ingebrigtsen , 52063@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 24 17:44:32 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpvNm-0009jH-HG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Nov 2021 17:44:32 +0100 Original-Received: from localhost ([::1]:54300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpvNl-0001ZW-D7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Nov 2021 11:44:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpvKT-0000Bu-1T for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 11:41:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpvKQ-0005Ab-F2 for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 11:41:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpvKQ-0006kQ-DL for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 11:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Nov 2021 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52063 X-GNU-PR-Package: emacs Original-Received: via spool by 52063-submit@debbugs.gnu.org id=B52063.163777202725888 (code B ref 52063); Wed, 24 Nov 2021 16:41:02 +0000 Original-Received: (at 52063) by debbugs.gnu.org; 24 Nov 2021 16:40:27 +0000 Original-Received: from localhost ([127.0.0.1]:54814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpvJr-0006jU-GF for submit@debbugs.gnu.org; Wed, 24 Nov 2021 11:40:27 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:35471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpvJp-0006jG-HS for 52063@debbugs.gnu.org; Wed, 24 Nov 2021 11:40:26 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E31C45C0178; Wed, 24 Nov 2021 11:40:19 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 24 Nov 2021 11:40:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=RtQa9BhsIBy/7PrBVUsPmz0jVC XH2dc2yu0jbnakJa4=; b=OH6hpf2XZIiTJtOLkW7mDzVP9NKDwI3/SHu8iSJcpP AoDecJRYuxlm+DQaVwwEDR0jmbS8uSLM/fxfXXOydlxpcTCFV2tf479lG3haHDGI AUmojGLio6GGxHM1e29EBkZxAk4rIHmlhFn2Iy/x8BCMjS+1QmZ9nYOgYCn5Y6PV Hk0ZqP/AXlHzVKwu+NmjnfSmq1eih50GURRVOJs2WQxAi/KjxJiFQ/T2RygtwdwZ gtmM+CkEuvrXZ08Uq6ttDZ5yIUf6Ack0LU7rGf6oGu4ijYEAznuVZG9r6evOY4Hs DN7HYlQA4TbTzCd5s5tM9xXvuicYNkdnFfChNTT6AqKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RtQa9B hsIBy/7PrBVUsPmz0jVCXH2dc2yu0jbnakJa4=; b=CrN59+fN2NWbUraVBlcjMs GVqJ6bv/IaA07jrbEBE1YU4TOiSifYbhkZaENbSrBkDpiO30LSj6H3LfwxjiYOAP N4+HocQzQi1ps3indM7PWqj/aUBdv+jtcNZxi/xTqzY15ry7GEMQaWpnsn8drTo7 5xhE14l6hBB/Qe24DCflvdQmo4wdVIPchtB4Elr7cG3QUA2+a2SpjK9CS/FzXJ1w 7M4Z65zBAL+55tXRmcSkXZyPGEHwGNxCxcmxZADYGT0uSzMN6vWbff+kXwUc++DZ IUoKSqD/gZ0GJExDHuej+1sTEQTXW58rbXFg+mwwkM1srNWoUkdvtLoUZUA4hYiw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeekgdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhiphhp ucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtffrrg htthgvrhhnpedvveekffdvueevhfdutdejheekvdeufeevtedttdevuddugfeiffeiveei vefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Nov 2021 11:40:18 -0500 (EST) In-Reply-To: <83pmqp8vps.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Nov 2021 16:38:39 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220747 Archived-At: On 24/11/2021 16:38 +0200, Eli Zaretskii wrote: >> From: Lars Ingebrigtsen >> 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.