Function: macroexpand-all

macroexpand-all is a byte-compiled function defined in macroexp.el.gz.

Signature

(macroexpand-all FORM &optional ENVIRONMENT)

Documentation

Return result of expanding macros at all levels in FORM.

If no macros are expanded, FORM is returned unchanged. The second optional arg ENVIRONMENT specifies an environment of macro definitions to shadow the loaded ones for use in file byte-compilation.

View in manual

Probably introduced at or before Emacs version 22.1.

Aliases

cl-macroexpand-all (obsolete since 24.3)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/macroexp.el.gz
;;;###autoload
(defun macroexpand-all (form &optional environment)
  "Return result of expanding macros at all levels in FORM.
If no macros are expanded, FORM is returned unchanged.
The second optional arg ENVIRONMENT specifies an environment of macro
definitions to shadow the loaded ones for use in file byte-compilation."
  (let ((macroexpand-all-environment environment)
        (macroexp--dynvars macroexp--dynvars))
    (macroexp--expand-all form)))