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: Fri, 29 Mar 2024 11:31:49 +0000 Message-ID: <878r21jmu2.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37485"; mail-complaints-to="usenet@ciao.gmane.io" To: 70068@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 29 12:33:25 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 1rqAU8-0009ZT-09 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 12:33:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqATo-00089e-Gr; Fri, 29 Mar 2024 07:33: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 1rqATm-00089M-3V for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 07:33:02 -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 1rqATl-0003Fz-Fu for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 07:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqATm-0003ri-B7 for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 07:33: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: Fri, 29 Mar 2024 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171171192614720 (code B ref -1); Fri, 29 Mar 2024 11:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2024 11:32:06 +0000 Original-Received: from localhost ([127.0.0.1]:41800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqASs-0003pM-Ep for submit@debbugs.gnu.org; Fri, 29 Mar 2024 07:32:06 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:59176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqASr-0003os-71 for submit@debbugs.gnu.org; Fri, 29 Mar 2024 07:32:05 -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 1rqASj-0007pr-5r for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 07:31:58 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqASg-0002xS-L2 for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 07:31:56 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AEC33240101 for ; Fri, 29 Mar 2024 12:31:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711711910; bh=ASKbXH5F4V9+XuEHrhtKK8QcNC6KxOxjobE9KHED9Kk=; h=From:To:Subject:OpenPGP:Date:Message-ID:MIME-Version:Content-Type: From; b=W+W8b7BUypHC5aabNEzPjnk3Kguzf/NWEbvAoQmyN0xibndeyYf7i0WO5uPZipu5B ARwWW1n8iYykjzxwSnKby6sEz8uuCxXL4DzUgK8+WRFbjLZbaI6GmQzBWwyuaEtaPw Ubf7wbQSDib5PbpyhIl8l1O6UZAkx97Wc4FLMxQKXNy4uLU2yCL/d//8l/9pnLVDrr XKh9YlMY4tKtftH7hh8A4073NUwSJg9CzQvfZ7A+n7TJtlXXzmp/R2nKnzBlkmc1ph qsb6CHsLTDSe3MHx/OgnXX5vnH4fM6vD8+pJwggGzb10MPmgbq/kWiM7YeytDgI6wh HJSJi/SC0rmxw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V5dXk2XcYz9rxF for ; Fri, 29 Mar 2024 12:31:50 +0100 (CET) OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:282282 Archived-At: --=-=-= Content-Type: text/plain The main intention here is to avoid underlining the first line in the *scratch* buffer when flymake is enabled: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Don't-warn-about-lexical-binding-in-lisp-interacti.patch Content-Description: [PATCH] Don't warn about lexical binding in lisp-interaction-mode >From 714cba0f576566e39b7ffeb77b8f9b80bb3003ff Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 29 Mar 2024 12:30:59 +0100 Subject: [PATCH] Don't warn about lexical binding in lisp-interaction-mode * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Suppress warning in 'lisp-interaction-mode' buffers like the *scratch* buffer. --- lisp/emacs-lisp/bytecomp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7af568cfe34..e04df8f9ade 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) + (unless (or (local-variable-p 'lexical-binding) + (derived-mode-p 'lisp-interaction-mode)) (let ((byte-compile-current-buffer (current-buffer))) (displaying-byte-compile-warnings (byte-compile-warn-x -- 2.44.0 --=-=-= Content-Type: text/plain -- Philip Kaludercic on peregrine --=-=-=--