mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-12 22:40:46 -08:00
Currently, a hard-coded set of macros is automatically expanded during generation of autoloads. To allow user macros to request such expansion, this implements a new declare form `autoload-macro' (Bug#78995), with supported value `expand'. For example, macros which wrap `define-minor-mode', can declare `(autoload-macro expand)' to request that ;;;###autoload-adorned calls to the macro are expanded during generation, such that an autoload for the resulting function is created. * lisp/emacs-lisp/byte-run.el (byte-run--set-autoload-macro): Handle autoload-macro declare forms. (macro-declarations-alist) Add handler for 'autoload-macro declare forms. (defmacro, defun): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric, cl-defun) (cl-iter-defun, cl-defmacro, cl-defstruct): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode, define-globalized-minor-mode, iter-defun): * lisp/emacs-lisp/inline.el (define-inline): * lisp/emacs-lisp/pcase.el (pcase-defmacro): Declare (autoload-macro expand) to request expansion of the macro during autoload generation. * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Handle the `autoload-macro=expand' property for macros. Load the ;;;###autoload-containing file if an unknown symbol is encountered in the car of the following form, to give packages a chance to define their macros and request expansion. Factor list of special function-defining macros out as a constant variable: `loaddefs--defining-macros'. * doc/lispref/functions.texi (Declare Form): * doc/lispref/loading.texi (Autoload): Document `autoload-macro'. |
||
|---|---|---|
| .. | ||
| emacs | ||
| lispintro | ||
| lispref | ||
| man | ||
| misc | ||
| translations | ||