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: Mon, 30 Jan 2023 13:59:52 +0100 Message-ID: References: <25094a24f891856fe0757fa34d80017b@bitrot.link> <83bkmh96gc.fsf@gnu.org> <43216edcfeada34083e17a8230af2ee3@bitrot.link> <83r0vc5hj9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OAvBUxRXTFljbRsj" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23265"; 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 Mon Jan 30 14:00:51 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 1pMTmF-0005sc-Gu for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Jan 2023 14:00:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMTlU-0002HK-Ck; Mon, 30 Jan 2023 08:00:04 -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 1pMTlN-0002H9-P8 for emacs-devel@gnu.org; Mon, 30 Jan 2023 07:59:58 -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 1pMTlL-0001Ag-JF for emacs-devel@gnu.org; Mon, 30 Jan 2023 07:59:57 -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=gbzrs5PlQKBopWpEVqTmUaFQDmP5By6xrrA1KGV9PiI=; b=jfmKf84ar/AiWLkQxfXILGWw4c Bb2GBTVOJSve4qRJQEplek+r4cP4otQrfV700MrzFfd7hywHazXClFZazIz8Xrn/epTmbCkncvtJh lRez+QY9N3yTd0VtHhdN0jj9m+cBFB4zrGfkHlyW0FP/zv3YTeVTeyfIr2IdLj5ugbHf0+zXLmxpf 9F2R6LLf996Fq7YPJkzKkNBZWQ4Y2CPmvou2khtfZOvqEfI0gtcSeSJLfyjhYuoKS/qSyeFzGmPe9 KHN54f2YW6h/6nB/9X5MaUEburmabecdfGyZt4Ic5yAb1zQbVlo4T9o+xUd6wQ6LJGtlC+eugulqy YblZhoBw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1pMTlI-00084a-IR for emacs-devel@gnu.org; Mon, 30 Jan 2023 13:59:52 +0100 Content-Disposition: inline In-Reply-To: <83r0vc5hj9.fsf@gnu.org> 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:302778 Archived-At: --OAvBUxRXTFljbRsj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 30, 2023 at 02:32:58PM +0200, Eli Zaretskii wrote: > > Date: Sun, 29 Jan 2023 20:53:30 -0700 > > From: abq@bitrot.link > > Cc: emacs-devel@gnu.org > >=20 > > On 2023-01-28 23:54, Eli Zaretskii wrote: > > > Wasn't that already explained? What happens if you say > > >=20 > > > (setq-default lexical-binding t) > > >=20 > > > and then load a Lisp file that expects dynamic-binding by default? > >=20 > > Then it breaks! >=20 > We want to avoid such a breakage. It is year 2023 out there, but > there's still gobs of code that assumes dynamic binding. Moreover, I still fail to understand why this is useful. Files with no binding declaration have most probably been writen at a time where dynamic binding was the only option [1]. So it does make sense to treat them as if there were a "lexical-binding: f" declaration in them. Everything else would be breaking the interface contract. You better not do that (this would be the same as changing the meaning of `+' for old programs: what for?) This means that the variable `lexical-binding' is always locally bound, so its global binding is meaningless. Cheers --=20 t --OAvBUxRXTFljbRsj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY9e/QgAKCRAFyCz1etHa RjjoAJ4zKvHM9KJb7VA2GeWz//vWt9lRRgCfRPbGFMcHeamSw2zBi1eiCkAoHgw= =5PB9 -----END PGP SIGNATURE----- --OAvBUxRXTFljbRsj--