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.devel Subject: Re: Why is lexical-binding's global value ignored? Date: Sun, 29 Jan 2023 08:54:11 +0200 Message-ID: <83bkmh96gc.fsf@gnu.org> References: <25094a24f891856fe0757fa34d80017b@bitrot.link> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: abq@bitrot.link Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 29 07:54:47 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 1pM1aQ-0005s2-92 for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Jan 2023 07:54:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pM1a3-0002CZ-8U; Sun, 29 Jan 2023 01:54:23 -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 1pM1a1-0002CP-W8 for emacs-devel@gnu.org; Sun, 29 Jan 2023 01:54:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pM1a1-00021T-Id; Sun, 29 Jan 2023 01:54:21 -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=c69mFoLmwDkxwXDcs/wcN6qyaVKVLpUuyWwkr9r10zU=; b=GI6bV5aCDozs DQdcFJUTeO14vhh7x5ay6elM904KgMnr1STau8xyKFAU9B0XUfJMz7SES1LgiIZm0yVLOe5/SLQIB mdll2AKH0fBbGEEEzYHB+1Ee9iGvU2GEiwcjAkLMlznYUO09oiGA3WokWvf7eMjCYel83WHtC4Q49 tA8nmj31r6olySDTADh7jBDOFQ6yUPWQX2fnZOO95pzBVDoR/J2qycByrvfEvGQ5pdemy3UM304Tc +II5q0wF8hvPh4Q5eYdgoG6i7C2Exg/L6rQoql7uu27jFAsfdhm9YHZMZ+kvZguX3Zkzx6CGWO9K+ KfwU2Ti826ScfpOEJqqNRQ==; Original-Received: from [87.69.77.57] (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 1pM1a0-0004S8-Rm; Sun, 29 Jan 2023 01:54:21 -0500 In-Reply-To: <25094a24f891856fe0757fa34d80017b@bitrot.link> (abq@bitrot.link) 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:302746 Archived-At: > Date: Sat, 28 Jan 2023 15:34:28 -0700 > From: abq@bitrot.link > > tomas wrote: > > The docs only talk about a buffer-local variable, so I'd guess that > > the global variable of the same name is simply ignored. > > Yes, and my question is: Why not honor it, instead of ignoring it? Wasn't that already explained? What happens if you say (setq-default lexical-binding t) and then load a Lisp file that expects dynamic-binding by default? IOW, the lack of lexical-binding: cookie in a file is interpreted as having an explicit "lexical-binding: nil" in that file, for the reasons Tomas explained.