From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#70068: [PATCH] Don't warn about lexical binding in lisp-interaction-mode Date: Wed, 03 Apr 2024 18:17:16 +0000 Message-ID: <8734s2cnv7.fsf@posteo.net> References: <2FB192D4-40E7-4327-BC0E-62674C2C1A03@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , 70068@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 03 20:18:14 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 1rs5Bd-0009Nm-7h for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Apr 2024 20:18:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs5BR-0001Ay-Ae; Wed, 03 Apr 2024 14:18:01 -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 1rs5BO-0001Aa-3i for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2024 14:17:58 -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 1rs5BN-000679-Re for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2024 14:17:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rs5BS-00066Q-95 for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2024 14:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Apr 2024 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70068-submit@debbugs.gnu.org id=B70068.171216825223377 (code B ref 70068); Wed, 03 Apr 2024 18:18:02 +0000 Original-Received: (at 70068) by debbugs.gnu.org; 3 Apr 2024 18:17:32 +0000 Original-Received: from localhost ([127.0.0.1]:59555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs5Ay-00064z-AR for submit@debbugs.gnu.org; Wed, 03 Apr 2024 14:17:32 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:49209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs5Aw-000647-6Y for 70068@debbugs.gnu.org; Wed, 03 Apr 2024 14:17:31 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E7926240104 for <70068@debbugs.gnu.org>; Wed, 3 Apr 2024 20:17:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712168238; bh=Wf6oBzhvPQvGasoVCjP3r1ie/EwhFNAA/dOR3OQh29k=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=cJuMpkxt1ZxTBVhlAabBrv5Vt6BnD93XgzkJDpxR7X6YqqpUYnpo1XaQO5/S+28kz psyvU0aHu0vR0uYK6Hqp0Mb/ht5cCg0zOsQonBmPC8Ijl1twnmZO6n7C5OV9QCqNiK 2Asa3XL7f2JF2SfOFy+zbK7GDmBe4Vx5kXXH8CCR9+D0Kon4cnHplvDZRm7gSxUkDZ mYFbWpgw762RZuVjduLvNdbVEwtiNJO7ezmqeIEAN/HB6AVFu9KHvM0XQZG7cea2yl BU3UN801if9wgM5SUPRxP4hP8zI8SgJI2JObPtZcmmRpdzeytpJN1MF3ScxppCeqHy eShZq34Ml59xg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V8tJF45dqz9rxB; Wed, 3 Apr 2024 20:17:17 +0200 (CEST) In-Reply-To: <2FB192D4-40E7-4327-BC0E-62674C2C1A03@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Wed, 3 Apr 2024 11:35:50 +0200") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt 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:282587 Archived-At: Mattias Engdeg=C3=A5rd writes: >> - (unless (local-variable-p 'lexical-binding) >> + (unless (or (local-variable-p 'lexical-binding) >> + (null lexical-binding)) > > That logic doesn't make sense to me, and it clearly doesn't work so I rev= erted it. > (For some reason the test didn't catch it, but it's now been made more ro= bust.) You are right, I made a mistake; What I want to say is this: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5cff86784f0..a1194f2dc70 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2234,7 +2234,8 @@ byte-compile-file (setq buffer-read-only nil filename buffer-file-name)) ;; Don't inherit lexical-binding from caller (bug#12938). - (unless (local-variable-p 'lexical-binding) + (when (or (not (local-variable-p 'lexical-binding)) + (null lexical-binding)) (let ((byte-compile-current-buffer (current-buffer))) (displaying-byte-compile-warnings (byte-compile-warn-x --8<---------------cut here---------------end--------------->8--- What makes me uncertain is that you say it makes "no sense", so I want to make sure I am not misunderstanding something completely. --=20 Philip Kaludercic on peregrine