diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-11-20 16:45:56 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-11-20 16:45:56 -0500 |
commit | 2ba2e7217f520a43a098b2ef92a452868b88cc70 (patch) | |
tree | 560cda52edb0efe3c177dba1506fbfb967acc138 /lisp/emacs-lisp | |
parent | 6924320aebce9ba885877da45e43d8d573da8bf6 (diff) | |
download | emacs-2ba2e7217f520a43a098b2ef92a452868b88cc70.tar.gz emacs-2ba2e7217f520a43a098b2ef92a452868b88cc70.tar.bz2 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 3 |
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. ;; and similar macros cleaner. (put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval) (defun byte-compile-file-form-eval (form) - (if (eq (car-safe (nth 1 form)) 'quote) + (if (and (eq (car-safe (nth 1 form)) 'quote) + (equal (nth 2 form) lexical-binding)) (nth 1 (nth 1 form)) (byte-compile-keep-pending form))) |