From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62840: 30.0.50; Doc bug: obsolete paragraph in Elisp Ref Date: Sat, 15 Apr 2023 09:11:37 -0400 Message-ID: References: <874jpiz75g.fsf@pierrot.dokosmarshall.org> <837cudedzq.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18247"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Nick Dokos , 62840@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 15 15:12:14 2023 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 1pnfhM-0004TU-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Apr 2023 15:12:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnfhE-0001Ff-K4; Sat, 15 Apr 2023 09:12:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnfhC-0001FG-HI for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnfhC-00036M-8x for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pnfhC-00083s-3h for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2023 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62840 X-GNU-PR-Package: emacs Original-Received: via spool by 62840-submit@debbugs.gnu.org id=B62840.168156430630956 (code B ref 62840); Sat, 15 Apr 2023 13:12:02 +0000 Original-Received: (at 62840) by debbugs.gnu.org; 15 Apr 2023 13:11:46 +0000 Original-Received: from localhost ([127.0.0.1]:48509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnfgw-00083D-BU for submit@debbugs.gnu.org; Sat, 15 Apr 2023 09:11:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnfgv-000830-3K for 62840@debbugs.gnu.org; Sat, 15 Apr 2023 09:11:45 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D19BF80814; Sat, 15 Apr 2023 09:11:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9FD8480012; Sat, 15 Apr 2023 09:11:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1681564298; bh=dC3gBXZP1/u4IUyP7cqUpHiYNXlVt2YN0VpQBliEnrE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dJ2RbM2QYL2s4kLw+7YhgT7ZmWyzj4XTJaYC6bRQMabSlXlcBgrJZAMsNX6zk+Ur2 msTKvVd9d2YgRfPh4VDMRzSgB7Q9Q+oYMWmBy8uBEo8z3IeEIW59tJSqIJ5o6jpp2d HFd/PKZoyCjQM64/wS1MxZ4FprVIgf0Vkm5CQNN+nSQkicO1fG8S2jZNH3kTgle6x1 7dQEA9JRJZpawQ1TahxoOK3AnvR3O19Pg+28gI5rADGLqQkDqHrD7aH659xvqzyAwu cahqNHiPky0l24R7ZxCVhuc7gNGNVSxD6Bfo5sTtHaOx7aQYB79uwoDFtCLXQkCXMt dt1k/SN4pFv2w== Original-Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 73C9B12037A; Sat, 15 Apr 2023 09:11:38 -0400 (EDT) In-Reply-To: <837cudedzq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Apr 2023 11:39:05 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260048 Archived-At: >> I don't know if the structure of the lexical environment was ever really >> relevant: it seems to be an internal detail that should not have found >> its way into the documentation in the first place, but that's guessing >> on my part. >> >> The important thing is that it does not seem to be the case any longer: >> the `t' is present at the end of the lexical environment in Emacs 28.2: >> >> (let ((foo 233)) (lambda (x) (* x foo))) ==> (closure ((foo . 233) t) (x) (* x foo)) >> >> but it is no longer present in current upstream: >> >> (let ((foo 233)) (lambda (x) (* x foo))) ==> (closure ((foo . 233)) (x) (* x foo)) >> >> so the above paragraph needs modification (if not outright excision). > > Stefan, any comments? Should this text be amended, deleted, or > something else? Indeed the "with a `t` at the end" should probably not have been documented and can be removed. The `t` can still appear there (sometimes it does sometimes it doesn't). More important would be to document that beside (SYM . VAL) pairs, the env can contain symbols, which means that the lexical environment declared that variable as being locally considered as a dynbind variable. E.g. in (defun my-fun (baz) (defvar my-foo) (lambda (x) (let ((my-foo x)) (bar baz)))) `my-foo` will appear in the environment of the closure returned by the function so as to remember the `defvar` since it affects the execution of the body. Stefan