summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-01-13 14:53:11 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2020-01-13 18:03:41 +0100
commitd645628e3cf6ebe5eaea3b40100bd77b9c823f8b (patch)
tree6c8ce3cab0e654100329275709ca58b553d7c1bf /lisp
parentc42198f78cbf7a75be67187a5de02e353a0918e8 (diff)
downloademacs-d645628e3cf6ebe5eaea3b40100bd77b9c823f8b.tar.gz
emacs-d645628e3cf6ebe5eaea3b40100bd77b9c823f8b.tar.bz2
emacs-d645628e3cf6ebe5eaea3b40100bd77b9c823f8b.zip
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. * doc/lispref/variables.texi: * etc/NEWS: Make it clear that lisp-interaction-mode uses lexical-binding.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/elisp-mode.el3
-rw-r--r--lisp/startup.el4
2 files changed, 3 insertions, 4 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 774e3324c2e..2617a6e4cce 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -933,7 +933,8 @@ Paragraphs are separated only by blank lines.
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 c27af726f9c..2a85c004da1 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1435,8 +1435,7 @@ please check its value")
(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 @@ A fancy display is used on graphic displays, normal otherwise."
(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)