From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52063: 28.0.60; Confusing presentation of lambda Date: Wed, 24 Nov 2021 21:53:33 +0200 Message-ID: <83v90h72ki.fsf@gnu.org> 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> <87sfvly160.fsf@gnus.org> <83ilwh8pf2.fsf@gnu.org> <83a6ht8n3p.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30920"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 52063@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 24 20:57:53 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 1mpyOv-0007sK-D5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Nov 2021 20:57:53 +0100 Original-Received: from localhost ([::1]:53392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpyOt-0002FO-It for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Nov 2021 14:57:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpyLG-0003Rp-Kt for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 14:54:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpyLD-00008I-J9 for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 14:54:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpyLC-0007bm-I8 for bug-gnu-emacs@gnu.org; Wed, 24 Nov 2021 14:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Nov 2021 19:54: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.163778362229206 (code B ref 52063); Wed, 24 Nov 2021 19:54:02 +0000 Original-Received: (at 52063) by debbugs.gnu.org; 24 Nov 2021 19:53:42 +0000 Original-Received: from localhost ([127.0.0.1]:55043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpyKs-0007az-7r for submit@debbugs.gnu.org; Wed, 24 Nov 2021 14:53:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpyKq-0007an-Nh for 52063@debbugs.gnu.org; Wed, 24 Nov 2021 14:53:41 -0500 Original-Received: from [2001:470:142:3::e] (port=45288 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpyKk-0008Tv-Ii; Wed, 24 Nov 2021 14:53:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=i9pMj7Yx9basDq+ayQ72GTG/y0ZGN2OXWj+VF1b2WjA=; b=iOo7u6wMGUJM agt3rDGiTXhqzNoHsP2X6Pf5LpKzZqR2oO8Az99ZFZOA/4Pt2Y3SigkN987ymj0/CSapwnwN5WQIw 4UGSoc8sTSNiEC+EGfCPP/GtNFVhOFqfqLn7yU9kGbdYrvTYJc1+++sZI7C3vlrh+/xqkuNunaQpO d4yVpKtWi9YoIugD/ye5MvDU3EeSb7ggu+EAsSl33YcOCtKgSz+b2fmFWBfElzTR8e2uyiK8OLiAO G94FWjDfU9eLzUYLAK4IdxZ9e3KRp/GS+FsjA0oOAR+S4qqdFf/VfEU32UbSHKtFITM7SDUb3cqAp x5jCvV3dYSjWIuspQECl1g==; Original-Received: from [87.69.77.57] (port=4589 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpyKk-0002QK-8E; Wed, 24 Nov 2021 14:53:34 -0500 In-Reply-To: (message from Stefan Monnier on Wed, 24 Nov 2021 14:06:37 -0500) 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:220769 Archived-At: > From: Stefan Monnier > Cc: larsi@gnus.org, 52063@debbugs.gnu.org > Date: Wed, 24 Nov 2021 14:06:37 -0500 > > > So this issue is specific to hooks? > > No, but in 99% of the cases you won't actually *see* a function value > (unless you specifically go looking for it, e.g. with `symbol-function`). We also have gobs of variables that are not hooks, which accept function values. And we also have menu items and mode-line constructs that sometimes use anonymous functions. And timer functions. And process filter and sentinel functions. And that's just 5 sec of thinking where one could meet them. > So you'll only get a value of the form (lambda ARGS . BODY) if you use > the dynamically scoped dialect of ELisp (or if you manually create such > a list, e.g. with '(lambda ...) or `(lambda ...) or (list 'lambda ...), > etc...). So I guess the warning about quoting lambdas with ' instead of #' is actually misleading people into getting these closures instead of the lambdas they might expect? Because that is how this started for me: during startup Emacs said: .emacs: Warning: (lambda nil \.\.\.) quoted with ' rather than with #' So why do we emit those warnings for Lisp code evaluated from a file that doesn't have lexical-binding setting in it? If it were not for this warning, I'd have never tried using #', and thus would have never bumped into this curiosity.