Variable: byte-compile-initial-macro-environment

byte-compile-initial-macro-environment is a variable defined in bytecomp.el.gz.

Value

Large value
((declare-function . byte-compile-macroexpand-declare-function)
 (eval-when-compile
   . #[128 "\300C\301\302!\303\304\"\"\210\305\242D\207"
	   [nil byte-compile-recurse-toplevel macroexp-progn
		make-closure
		#[257 "	\n\300\303\304\305\306!!!!\240*\207"
		      [V0 byte-compile-unresolved-functions
			  byte-compile-new-defuns byte-compile-eval
			  byte-run-strip-symbol-positions
			  byte-compile-top-level
			  byte-compile-preprocess]
		      7
		      ("/nix/store/yvwy8dm26cpa1j12ixgs1dyiaw2abdk9-emacs-snapshot/share/emacs/31.0.50/lisp/emacs-lisp/bytecomp.elc"
		       . 16320)]
		quote]
	   7
	   ("/nix/store/yvwy8dm26cpa1j12ixgs1dyiaw2abdk9-emacs-snapshot/share/emacs/31.0.50/lisp/emacs-lisp/bytecomp.elc"
	    . 16297)])
 (eval-and-compile
   . #[128 "\300\301!\302\"\207"
	   [byte-compile-recurse-toplevel macroexp-progn
					  #[257
					    "\304\"\305\306\307!!	\205�\310\n\"\206�\311\"\210\207"
					    [macroexpand-all-environment
					     lexical-binding
					     macroexp--dynvars
					     byte-compile-bound-variables
					     macroexpand--all-toplevel
					     eval
					     byte-run-strip-symbol-positions
					     bytecomp--copy-tree
					     append t]
					    7
					    ("/nix/store/yvwy8dm26cpa1j12ixgs1dyiaw2abdk9-emacs-snapshot/share/emacs/31.0.50/lisp/emacs-lisp/bytecomp.elc"
					     . 16320)]]
	   4
	   ("/nix/store/yvwy8dm26cpa1j12ixgs1dyiaw2abdk9-emacs-snapshot/share/emacs/31.0.50/lisp/emacs-lisp/bytecomp.elc"
	    . 16297)])
 (with-suppressed-warnings .
   #[385
     "\211\203�\302\"\303\304D\305\306B	\")E\207\307\310\311!\312\313\314%\207"
     [byte-compile--suppressed-warnings macroexpand-all-environment
					append
					internal--with-suppressed-warnings
					quote macroexpand-all progn
					macroexp-warn-and-return
					format-message
					"`with-suppressed-warnings' with empty body"
					nil
					(empty-body
					 with-suppressed-warnings)
					t]
     8
     ("/nix/store/yvwy8dm26cpa1j12ixgs1dyiaw2abdk9-emacs-snapshot/share/emacs/31.0.50/lisp/emacs-lisp/bytecomp.elc"
      . 16337)]))

Documentation

The default macro-environment passed to macroexpand by the compiler.

Placing a macro here will cause a macro to have different semantics when expanded by the compiler as when expanded by the interpreter.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defconst byte-compile-initial-macro-environment
  `(
    ;; (byte-compiler-options . (lambda (&rest forms)
    ;;                         (apply 'byte-compiler-options-handler forms)))
    (declare-function . byte-compile-macroexpand-declare-function)
    (eval-when-compile . ,(lambda (&rest body)
                            (let ((result nil))
                              (byte-compile-recurse-toplevel
                               (macroexp-progn body)
                               (lambda (form)
                                 ;; Insulate the following variables
                                 ;; against changes made in the
                                 ;; subsidiary compilation.  This
                                 ;; prevents spurious warning
                                 ;; messages: "not defined at runtime"
                                 ;; etc.
                                 (let ((byte-compile-unresolved-functions
                                        byte-compile-unresolved-functions)
                                       (byte-compile-new-defuns
                                        byte-compile-new-defuns))
                                   (setf result
                                         (byte-compile-eval
                                          (byte-run-strip-symbol-positions
                                           (byte-compile-top-level
                                            (byte-compile-preprocess form))))))))
                              (list 'quote result))))
    (eval-and-compile . ,(lambda (&rest body)
                           (byte-compile-recurse-toplevel
                            (macroexp-progn body)
                            (lambda (form)
                              ;; Don't compile here, since we don't know
                              ;; whether to compile as byte-compile-form
                              ;; or byte-compile-file-form.
                              (let ((expanded
                                     (macroexpand--all-toplevel
                                      form
                                      macroexpand-all-environment)))
                                (eval (byte-run-strip-symbol-positions
                                       (bytecomp--copy-tree expanded))
                                      (when lexical-binding
                                        (or (append
                                             macroexp--dynvars
                                             byte-compile-bound-variables)
                                            t)))
                                expanded)))))
    (with-suppressed-warnings
        . ,(lambda (warnings &rest body)
             ;; We let-bind `byte-compile--suppressed-warnings' here in order
             ;; to affect warnings emitted during macroexpansion.
             ;; Later `internal--with-suppressed-warnings' binds it again, this
             ;; time in order to affect warnings emitted during the
             ;; compilation itself.
             (if body
                 (let ((byte-compile--suppressed-warnings
                        (append warnings byte-compile--suppressed-warnings)))
                   ;; This function doesn't exist, but is just a placeholder
                   ;; symbol to hook up with the
                   ;; `byte-hunk-handler'/`byte-defop-compiler-1' machinery.
                   `(internal--with-suppressed-warnings
                     ',warnings
                     ,(macroexpand-all `(progn ,@body)
                                       macroexpand-all-environment)))
               (macroexp-warn-and-return
                (format-message "`with-suppressed-warnings' with empty body")
                nil '(empty-body with-suppressed-warnings) t warnings)))))
  "The default macro-environment passed to macroexpand by the compiler.
Placing a macro here will cause a macro to have different semantics when
expanded by the compiler as when expanded by the interpreter.")