all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70068: [PATCH] Don't warn about lexical binding in lisp-interaction-mode
@ 2024-03-29 11:31 Philip Kaludercic
  2024-03-30  6:57 ` Eli Zaretskii
  2024-04-03  9:35 ` Mattias Engdegård
  0 siblings, 2 replies; 19+ messages in thread
From: Philip Kaludercic @ 2024-03-29 11:31 UTC (permalink / raw)
  To: 70068

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

The main intention here is to avoid underlining the first line in the
*scratch* buffer when flymake is enabled:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Don't warn about lexical binding in lisp-interaction-mode --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From 714cba0f576566e39b7ffeb77b8f9b80bb3003ff Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
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


[-- Attachment #3: Type: text/plain, Size: 37 bytes --]


-- 
	Philip Kaludercic on peregrine

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-04-09 13:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 11:31 bug#70068: [PATCH] Don't warn about lexical binding in lisp-interaction-mode Philip Kaludercic
2024-03-30  6:57 ` Eli Zaretskii
2024-03-30 11:07   ` Philip Kaludercic
2024-03-30 12:54     ` Eli Zaretskii
2024-04-01  5:27       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-03  8:52         ` Philip Kaludercic
2024-04-03  9:35 ` Mattias Engdegård
2024-04-03 18:17   ` Philip Kaludercic
2024-04-03 19:07     ` Mattias Engdegård
2024-04-06 10:14       ` Mattias Engdegård
2024-04-08  7:21         ` Philip Kaludercic
2024-04-08 11:41           ` Eli Zaretskii
2024-04-08 12:02             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09  8:57               ` Mattias Engdegård
2024-04-09  9:51                 ` Eli Zaretskii
2024-04-09 10:45                   ` Mattias Engdegård
2024-04-09 11:24                     ` Eli Zaretskii
2024-04-09 13:35                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 13:42                       ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.