Function: macroexp--compiler-macro

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

Signature

(macroexp--compiler-macro HANDLER FORM)

Documentation

Apply compiler macro HANDLER to FORM and return the result.

Unless macroexp-inhibit-compiler-macros is non-nil, in which case return FORM unchanged.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/macroexp.el.gz
(defun macroexp--compiler-macro (handler form)
  "Apply compiler macro HANDLER to FORM and return the result.
Unless `macroexp-inhibit-compiler-macros' is non-nil, in which
case return FORM unchanged."
  (if macroexp-inhibit-compiler-macros
      form
    (condition-case-unless-debug err
        (macroexp-preserve-posification
             form
          (apply handler form (cdr form)))
      (error
       ;; Don't complain if there's an arity error when calling the handler
       ;; itself as that is likely the just wrong number of arguments
       ;; passed to the function; let the compiler take care of it.
       (unless (and (eq (car err) 'wrong-number-of-arguments)
                    (eq (indirect-function (nth 1 err))
                        (indirect-function handler)))
         (message "Warning: Optimization failure for %S: Handler: %S\n%S"
                  (car form) handler err))
       form))))