mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 08:10:21 -08:00
Execute top level forms in the right lex/dyn scope.
* lisp/emacs-lisp/bytecomp.el (byte-to-native-top-level): Add 'lexical' slot. (byte-compile-output-file-form): Update for new slot. (byte-compile-file-form-defmumble): Capture scope. * lisp/emacs-lisp/comp.el (comp-emit-for-top-level): Specify execution scope.
This commit is contained in:
parent
47ab6c237e
commit
29b2a08c36
2 changed files with 11 additions and 8 deletions
|
|
@ -585,7 +585,7 @@ Each element is (INDEX . VALUE)")
|
|||
name c-name byte-func)
|
||||
(cl-defstruct byte-to-native-top-level
|
||||
"All other top-level forms."
|
||||
form)
|
||||
form lexical)
|
||||
|
||||
(defvar byte-native-compiling nil
|
||||
"Non nil while native compiling.")
|
||||
|
|
@ -2248,7 +2248,7 @@ Call from the source buffer."
|
|||
;; it here.
|
||||
(when byte-native-compiling
|
||||
;; Spill output for the native compiler here
|
||||
(push (make-byte-to-native-top-level :form form)
|
||||
(push (make-byte-to-native-top-level :form form :lexical lexical-binding)
|
||||
byte-to-native-top-level-forms))
|
||||
(let ((print-escape-newlines t)
|
||||
(print-length nil)
|
||||
|
|
@ -2707,7 +2707,8 @@ not to take responsibility for the actual compilation of the code."
|
|||
;; Spill output for the native compiler here.
|
||||
(push (if macro
|
||||
(make-byte-to-native-top-level
|
||||
:form `(defalias ',name '(macro . ,code) nil))
|
||||
:form `(defalias ',name '(macro . ,code) nil)
|
||||
:lexical lexical-binding)
|
||||
(make-byte-to-native-func-def :name name
|
||||
:byte-func code))
|
||||
byte-to-native-top-level-forms))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue