diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-23 16:49:13 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-23 16:49:13 -0500 |
commit | 002c019c34eeb1cad4ce8f5ae721b1cdf22f0946 (patch) | |
tree | 1db14c2e01e8abf554347b8fbbad43a72c2df48b /lisp/emacs-lisp | |
parent | 977f932513ce1d8ee73eafb73e39d51774021fab (diff) | |
download | emacs-002c019c34eeb1cad4ce8f5ae721b1cdf22f0946.tar.gz emacs-002c019c34eeb1cad4ce8f5ae721b1cdf22f0946.tar.bz2 emacs-002c019c34eeb1cad4ce8f5ae721b1cdf22f0946.zip |
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Setup default value for
lexical-binding.
Fixes: debbugs:12938
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7534ce5eaca..df6a79d5196 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1745,6 +1745,9 @@ The value is non-nil if there were no errors, nil if errors." ;; There may be a file local variable setting (bug#10419). (setq buffer-read-only nil filename buffer-file-name)) + ;; Don't inherit lexical-binding from caller (bug#12938). + (unless (local-variable-p 'lexical-binding) + (setq-local lexical-binding nil)) ;; Set the default directory, in case an eval-when-compile uses it. (setq default-directory (file-name-directory filename))) ;; Check if the file's local variables explicitly specify not to |