Function: macroexp-macroexpand

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

Signature

(macroexp-macroexpand FORM ENV)

Documentation

Like macroexpand but checking obsolescence.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/macroexp.el.gz
(defun macroexp-macroexpand (form env)
  "Like `macroexpand' but checking obsolescence."
  (let* ((macroexpand-all-environment env)
         new-form)
    (macroexp-preserve-posification
        form
      (while (not (eq form (setq new-form (macroexpand-1 form env))))
        (let ((fun (car-safe form)))
          (setq form
                (if (and fun (symbolp fun)
                         (get fun 'byte-obsolete-info))
                    (macroexp-warn-and-return
                     (macroexp--obsolete-warning
                      fun (get fun 'byte-obsolete-info)
                      (if (symbolp (symbol-function fun)) "alias" "macro"))
                     new-form (list 'obsolete fun) nil fun)
                  new-form))))
      form)))