From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>, martin rudalics <rudalics@gmx.at>
Cc: 38835@debbugs.gnu.org
Subject: bug#38835: 27; Recreated *scratch* buffer has lexical-binding = nil
Date: Mon, 13 Jan 2020 14:57:29 +0100 [thread overview]
Message-ID: <48D74E81-3535-4711-859B-5977F1D33B48@acm.org> (raw)
In-Reply-To: <83sgkzjgr5.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
1 jan. 2020 kl. 17.14 skrev Eli Zaretskii <eliz@gnu.org>:
> Or maybe we should decide that lisp-interaction-mode should do this
> for any buffer?
Yes, that seems to be the best and simplest choice. Patch OK for emacs-27?
[-- Attachment #2: 0001-Always-use-lexical-binding-in-lisp-interaction-mode-.patch --]
[-- Type: application/octet-stream, Size: 1854 bytes --]
From e258f78fd1869d301d94ff555358591e49541d94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Mon, 13 Jan 2020 14:53:11 +0100
Subject: [PATCH] Always use lexical-binding in lisp-interaction-mode
(bug#38835)
* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
Set lexical-binding.
* lisp/startup.el (command-line, startup--get-buffer-create-scratch):
Don't set lexical-binding here.
---
lisp/progmodes/elisp-mode.el | 3 ++-
lisp/startup.el | 4 +---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 774e3324c2..2617a6e4cc 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -933,7 +933,8 @@ lisp-interaction-mode
Semicolons start comments.
\\{lisp-interaction-mode-map}"
- :abbrev-table nil)
+ :abbrev-table nil
+ (setq-local lexical-binding t))
;;; Emacs Lisp Byte-Code mode
diff --git a/lisp/startup.el b/lisp/startup.el
index c27af726f9..2a85c004da 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1435,8 +1435,7 @@ command-line
(if (get-buffer "*scratch*")
(with-current-buffer "*scratch*"
(if (eq major-mode 'fundamental-mode)
- (funcall initial-major-mode))
- (setq-local lexical-binding t)))
+ (funcall initial-major-mode))))
;; Load library for our terminal type.
;; User init file can set term-file-prefix to nil to prevent this.
@@ -2317,7 +2316,6 @@ startup--get-buffer-create-scratch
(or (get-buffer "*scratch*")
(with-current-buffer (get-buffer-create "*scratch*")
(set-buffer-major-mode (current-buffer))
- (setq-local lexical-binding t)
(current-buffer))))
(defun command-line-1 (args-left)
--
2.21.0 (Apple Git-122.2)
next prev parent reply other threads:[~2020-01-13 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 15:52 bug#38835: 27; Recreated *scratch* buffer has lexical-binding = nil Mattias Engdegård
2020-01-01 16:14 ` Eli Zaretskii
2020-01-01 17:49 ` martin rudalics
2020-01-13 13:57 ` Mattias Engdegård [this message]
2020-01-13 16:30 ` Eli Zaretskii
2020-01-13 17:04 ` Mattias Engdegård
2020-01-13 18:38 ` Eli Zaretskii
2020-01-13 18:54 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48D74E81-3535-4711-859B-5977F1D33B48@acm.org \
--to=mattiase@acm.org \
--cc=38835@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.