• Stefan Monnier's avatar
    Macro-expand interpreted code during load. · 972debf2
    Stefan Monnier authored
    * src/lread.c (readevalloop): Call internal-macroexpand-for-load to perform
    eager (load-time) macro-expansion.
    * src/lisp.mk (lisp): Add macroexp.
    * lisp/loadup.el: Load macroexp.  Remove hack.
    * lisp/emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function.
    (macroexp--expand-all): Use it to get better warnings.
    (macroexp--backtrace, macroexp--trim-backtrace-frame)
    (internal-macroexpand-for-load): New functions.
    (macroexp--pending-eager-loads): New var.
    (emacs-startup-hook): New hack to replace one in loadup.el.
    * lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-list*)
    (cl--compiler-macro-cXXr): Move to top, before they can be used.
    (cl-psetf): Simplify.
    (cl-defstruct): Add indent rule.
    972debf2
loadup.el 13.9 KB