aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2020-11-20 16:45:56 -0500
committerStefan Monnier2020-11-20 16:45:56 -0500
commit2ba2e7217f520a43a098b2ef92a452868b88cc70 (patch)
tree560cda52edb0efe3c177dba1506fbfb967acc138
parent6924320aebce9ba885877da45e43d8d573da8bf6 (diff)
downloademacs-2ba2e7217f520a43a098b2ef92a452868b88cc70.tar.gz
emacs-2ba2e7217f520a43a098b2ef92a452868b88cc70.zip
Don't optimize away `eval` when its lexical context is different
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-eval): Obey lexical-binding.
-rw-r--r--lisp/emacs-lisp/bytecomp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index cbda16d051b..e6f6a12b53d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2570,7 +2570,8 @@ list that represents a doc string reference.
2570;; and similar macros cleaner. 2570;; and similar macros cleaner.
2571(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval) 2571(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval)
2572(defun byte-compile-file-form-eval (form) 2572(defun byte-compile-file-form-eval (form)
2573 (if (eq (car-safe (nth 1 form)) 'quote) 2573 (if (and (eq (car-safe (nth 1 form)) 'quote)
2574 (equal (nth 2 form) lexical-binding))
2574 (nth 1 (nth 1 form)) 2575 (nth 1 (nth 1 form))
2575 (byte-compile-keep-pending form))) 2576 (byte-compile-keep-pending form)))
2576 2577