From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Why is lexical-binding's global value ignored? Date: Sat, 28 Jan 2023 08:10:23 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uIDzq0vpWvL08prZ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5297"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 28 08:11:18 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pLfMs-0001E6-09 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Jan 2023 08:11:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLfM6-0008SK-EK; Sat, 28 Jan 2023 02:10:30 -0500 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 1pLfM5-0008S8-3A for emacs-devel@gnu.org; Sat, 28 Jan 2023 02:10:29 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLfM3-0007Kz-C8 for emacs-devel@gnu.org; Sat, 28 Jan 2023 02:10:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Kkz/G62K/VosLX387mBz1bo+x08w9UAhTA158+s8Qbs=; b=oyryPLzq/pZy6uS8XIgn06IRbY RVEHutz5Eot0zWXjTLAqCoyHFu2KfZc3jbCvx3Sa4WT4s+7LEFfjjfD+VV9LcFkx2bSXLvRazvs6o fMP0BDsPtPDltZ8JTmlCSZKv691Ke0RZbmtRMTUuPvkMBPFRSCIl5RACKcAEGMD/UNFr/EoK8hP2O EjwyIZ1ds/iyPjFSpNk1FByfMqpjIOjBhgKpc9wgC8dEhIaoAGKWjjUB+hnJzSR7h384U3rEFB/Yz hZeRck5KwYluoEmT57O8eEJwKUdCcAePFGtBZYKTi0qXQIMehlHRNZSma2rLvIQS9HoaG0D0QYNZm BK7cUjww==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1pLfLz-0007c6-Uu for emacs-devel@gnu.org; Sat, 28 Jan 2023 08:10:23 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302701 Archived-At: --uIDzq0vpWvL08prZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 27, 2023 at 08:01:47PM -0700, abq@bitrot.link wrote: > If somebody does (setq-default lexical-binding t), the intention is obvio= us. > But in current versions of Emacs, when loading a file that doesn't specif= y a > local value for lexical-binding, the global value is ignored. Why? >=20 > IOW, what would break if the global value were honored? It defaults to ni= l, > which is already how files are loaded if no local value is specified, so > honoring the global wouldn't change anything by default. I think it's backward compatibility, mainly. Files with no explicit lexical binding setting (may) contain code which expects dynamic binding and would break. It's not about the code distributed with Emacs, but about the code you have been using for 15 years which would fail in obscure ways. IOW, "not having a binding declaration in a file means dynamic binding" has become a contract :-) Cheers --=20 t --uIDzq0vpWvL08prZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY9TKVwAKCRAFyCz1etHa RqTyAJiUxLc7iOB0FKfM8qiQfgT2wMKNAJ9OOlQLdWlEYpSKCKsrYYUEbUFAsQ== =XhnQ -----END PGP SIGNATURE----- --uIDzq0vpWvL08prZ--