aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/variables.texi3
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/progmodes/elisp-mode.el3
-rw-r--r--lisp/startup.el4
4 files changed, 8 insertions, 5 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 1ec97e2f3de..1e357754abe 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1187,6 +1187,9 @@ When evaluating Emacs Lisp code directly using an @code{eval} call,
1187lexical binding is enabled if the @var{lexical} argument to 1187lexical binding is enabled if the @var{lexical} argument to
1188@code{eval} is non-@code{nil}. @xref{Eval}. 1188@code{eval} is non-@code{nil}. @xref{Eval}.
1189 1189
1190Lexical binding is also enabled in Lisp Interaction and IELM
1191mode, used in the @file{*scratch*} and @file{*ielm*} buffers.
1192
1190@cindex special variables 1193@cindex special variables
1191 Even when lexical binding is enabled, certain variables will 1194 Even when lexical binding is enabled, certain variables will
1192continue to be dynamically bound. These are called @dfn{special 1195continue to be dynamically bound. These are called @dfn{special
diff --git a/etc/NEWS b/etc/NEWS
index 61b9e4a7237..031ddf58005 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -338,7 +338,8 @@ answers, but also function keys like 'F1', character events such as
338 338
339** Lexical binding is now used when evaluating interactive Elisp forms. 339** Lexical binding is now used when evaluating interactive Elisp forms.
340More specifically, lexical-binding is now used for 'M-:', '--eval', as 340More specifically, lexical-binding is now used for 'M-:', '--eval', as
341well as in the "*scratch*" and "*ielm*" buffers. 341well as in lisp-interaction-mode and ielm-mode, used in the "*scratch*"
342and "*ielm*" buffers.
342 343
343--- 344---
344** The new user option 'tooltip-resize-echo-area' avoids truncating 345** The new user option 'tooltip-resize-echo-area' avoids truncating
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.
933Semicolons start comments. 933Semicolons start comments.
934 934
935\\{lisp-interaction-mode-map}" 935\\{lisp-interaction-mode-map}"
936 :abbrev-table nil) 936 :abbrev-table nil
937 (setq-local lexical-binding t))
937 938
938;;; Emacs Lisp Byte-Code mode 939;;; Emacs Lisp Byte-Code mode
939 940
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")
1435 (if (get-buffer "*scratch*") 1435 (if (get-buffer "*scratch*")
1436 (with-current-buffer "*scratch*" 1436 (with-current-buffer "*scratch*"
1437 (if (eq major-mode 'fundamental-mode) 1437 (if (eq major-mode 'fundamental-mode)
1438 (funcall initial-major-mode)) 1438 (funcall initial-major-mode))))
1439 (setq-local lexical-binding t)))
1440 1439
1441 ;; Load library for our terminal type. 1440 ;; Load library for our terminal type.
1442 ;; User init file can set term-file-prefix to nil to prevent this. 1441 ;; 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."
2317 (or (get-buffer "*scratch*") 2316 (or (get-buffer "*scratch*")
2318 (with-current-buffer (get-buffer-create "*scratch*") 2317 (with-current-buffer (get-buffer-create "*scratch*")
2319 (set-buffer-major-mode (current-buffer)) 2318 (set-buffer-major-mode (current-buffer))
2320 (setq-local lexical-binding t)
2321 (current-buffer)))) 2319 (current-buffer))))
2322 2320
2323(defun command-line-1 (args-left) 2321(defun command-line-1 (args-left)