Subject: bug#30078: 27.0.50; Use lexical-binding for M-:

From: Stefan Monnier <[email-masked]>
Date: Thu, 11 Jan 2018 11:36:54 -0500

Package: Emacs
Version: 27.0.50

I think we should slowly move towards making lexical-binding the default
and we could start by making M-: always use lexical binding.
WDYT?

        Stefan

diff --git a/lisp/simple.el b/lisp/simple.el
index 4c69e0f6ff..fa31ef9f0f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1608,12 +1608,12 @@ eval-expression
          (eval-expression-get-print-arguments current-prefix-arg)))
 
   (if (null eval-expression-debug-on-error)
-      (push (eval exp lexical-binding) values)
+      (push (eval exp t) values)
     (let ((old-value (make-symbol "t")) new-value)
       ;; Bind debug-on-error to something unique so that we can
       ;; detect when evalled code changes it.
       (let ((debug-on-error old-value))
-	(push (eval (macroexpand-all exp) lexical-binding) values)
+	(push (eval (macroexpand-all exp) t) values)
 	(setq new-value debug-on-error))
       ;; If evalled code has changed the value of debug-on-error,
       ;; propagate that change to the global binding.