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#74145: 31.0.50; Default lexical-binding to t Date: Thu, 31 Oct 2024 21:20:41 -0400 Message-ID: References: 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="19198"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Andrea Corallo , 74145@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 01 02:21:31 2024 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 1t6gLz-0004mi-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Nov 2024 02:21:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6gLY-0008EA-N0; Thu, 31 Oct 2024 21:21: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 1t6gLX-0008Dg-Em for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2024 21:21:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6gLX-00075d-6B for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2024 21:21:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=J3cDi5UDBIniQ6LMfVQx0dyFC23ywp9kNpR1/rx2ii4=; b=dYQaXUVVvtmo6xvLL8LBw9wKSaJ4tYelIuECU6F4vtucZ4NXHmUsO48skI3aJtsQPEs2WNcLoHJlA/81Vqxm/rWzHvs4tMjFWYHHuU1BTyIZshHOq4vRop0W5vs4+XQUgbjmuiurZFqlpkrgAbKkLpnZ8JNo7qCptF2dhnu7shVoa3HaqWjBGg8wgoO1Q4wyHmrpkx6RrBGpktjMBo9QdWyrtmvTj41h2U75Xnt5XwvMG0AX2DW8D9OmCPsgcvAzvxw7xaLrjgcpujsYf95zQxH5akD3MDLgmiBSdTszYXYpJryzmNB+/cfM83LABGOpaJ/tLFxuhH5+o1z2F/insQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6gLW-0001ZU-6R for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2024 21:21: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: Fri, 01 Nov 2024 01:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74145 X-GNU-PR-Package: emacs Original-Received: via spool by 74145-submit@debbugs.gnu.org id=B74145.17304240576027 (code B ref 74145); Fri, 01 Nov 2024 01:21:02 +0000 Original-Received: (at 74145) by debbugs.gnu.org; 1 Nov 2024 01:20:57 +0000 Original-Received: from localhost ([127.0.0.1]:45575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6gLQ-0001Z9-OI for submit@debbugs.gnu.org; Thu, 31 Oct 2024 21:20:57 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6gLL-0001Yi-7p for 74145@debbugs.gnu.org; Thu, 31 Oct 2024 21:20:52 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4F15E4444BA; Thu, 31 Oct 2024 21:20:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730424043; bh=vjqR5154sYxCw9PXa2/3jFKT/zIpTGvU7hMbOMENiqI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jxYbZHjxGNAEq+26LMXQm3S63UU+szSPTQCGBOHeqNvQ95t+4sABeitMj+CRVfFL1 0I5nBRxdNAxJugtagl48jV7nspXggQSXy30SYVTTvAzIu+oeYhk4zxDrOZT0j/b8pY NxTT9MKvB104ng1O3tthmN6q5FpvRA4KLtYOp/e+gAXZHCDoI3bMpsOQtzBbLUjxdw 2u55GONWuXsUhhXXI5oUDWEgY5j/wNeI6ew1/4fuMQyh1jKMzdzjFRu5UISReFQR+1 4iuwS08OO9/c5Nb2ERG61ZI6Iym4mEBMJtvVdEm5cPtYbME3U31IHoEM/T1v+MHp6v ZgRW9bTBmT3/A== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2150F4444AD; Thu, 31 Oct 2024 21:20:43 -0400 (EDT) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DDBBF120243; Thu, 31 Oct 2024 21:20:42 -0400 (EDT) In-Reply-To: (Stefan Kangas's message of "Thu, 31 Oct 2024 16:31:49 -0700") 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:294647 Archived-At: Hi Stefan, >> @@ -392,7 +392,7 @@ Void Variables >> to evaluate the variable signals a @code{void-variable} error, instead >> of returning a value. >> >> - Under the optional lexical scoping rule, the value cell only holds >> + Under the optional lexical scoping rule, the value cell holds only >> the variable's global value---the value outside of any lexical binding >> construct. When a variable is lexically bound, the local value is >> determined by the lexical environment; hence, variables can have local > > I think this section might need more work. It's a bit confusing to talk > about "default dynamic scoping" and "optional lexical scoping" now. > Shouldn't we talk about "normal variables with lexical scoping" and > "special variables with dynamic scoping" or something along those lines? Very good point, will take a closer look. >> + (lexical-binding (default-toplevel-value 'lexical-binding))) > Why not just use `t` here instead of its `default-toplevel-value`? I "fixed" the code such that the default is set at exactly one place, i.e. in `syms_of_lread`, but indeed it's not indispensable. It's not super important, but it seemed cleaner. It also makes it easy for users to "go back" to the nil default, e.g. for testing purposes, or as a quick fix until you can track down the `.el` files that need to be adjusted. Stefan