1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/lisp/emacs-lisp
JD Smith 7486e5c368 Implement new autoload macro expansion declare form
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'.
2025-08-10 18:14:23 -04:00
..
advice.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
avl-tree.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
backquote.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
backtrace.el backtrace.el: Remove redundant put and :group 2025-03-25 14:16:03 -04:00
benchmark.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bindat.el Fix capitalization ELisp -> Elisp 2025-03-12 09:38:33 +08:00
byte-opt.el Preserve source position of macro calls in macro expansions 2025-07-13 20:28:51 +00:00
byte-run.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
bytecomp.el bytecomp.el: Rework the message when the macro is not recognized 2025-07-26 18:35:00 -04:00
cconv.el ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places 2025-03-12 10:24:22 +08:00
chart.el Prefer incf to cl-incf in emacs-lisp/*.el 2025-02-23 00:38:22 +01:00
check-declare.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
checkdoc.el Teach checkdoc about (:this that) in cl-defun 2025-06-07 12:15:33 +03:00
cl-extra.el Make cl-random behave consistently for unusual arguments (bug#75105) 2025-06-20 06:09:24 +00:00
cl-generic.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
cl-indent.el Prefer incf to cl-incf in emacs-lisp/*.el 2025-02-23 00:38:22 +01:00
cl-lib.el cl-types: Improve error messages 2025-05-08 17:11:05 -04:00
cl-macs.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
cl-preloaded.el (cl--class-allparents): Fix bug#78989 2025-07-14 12:37:11 -04:00
cl-print.el vc-do-async-command: Ellipse later lines in multiline arguments 2025-04-12 10:05:57 +08:00
cl-seq.el (cl-nsubstitute): Fix regression in commit 8c8ff13e 2025-07-27 09:19:42 -04:00
comp-common.el ; Grammar fixes for "native-compiled" 2025-02-28 20:20:55 +01:00
comp-cstr.el Nativecomp don't materialize non-materializable objects (bug#78606) 2025-07-09 17:32:07 +02:00
comp-run.el Improve native--compile-skip-on-battery-p 2025-05-03 10:32:42 +08:00
comp.el comp.el: Fix minor corner-case annoyances 2025-07-17 12:36:57 -04:00
compat.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cond-star.el Fix Package name for cond-star 2025-03-10 07:45:21 -03:00
copyright.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
crm.el (completing-read-multiple): Set missing buffer-local variables 2025-08-02 12:29:23 -04:00
cursor-sensor.el (smerge-refine-shadow-cursor): New variable and face (bug#78806) 2025-06-23 00:00:38 -04:00
debug-early.el (debug--early): Avoid re-entering the debugger for the same error 2025-03-06 15:23:03 -05:00
debug.el (debug--early): Avoid re-entering the debugger for the same error 2025-03-06 15:23:03 -05:00
derived.el ; Use defvar-keymap in define-derived-mode 2025-03-18 00:33:32 +01:00
disass.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
easy-mmode.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
easymenu.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
edebug.el Remove redundant constant nil argument to gethash 2025-03-29 14:59:09 +01:00
eieio-base.el (eieio-backward-compatibility): Set to warn (bug#77612) 2025-04-17 00:04:04 -04:00
eieio-core.el Call eieio--class-* accessors only on eieio classes (bug#78786) 2025-07-09 15:20:14 +00:00
eieio-custom.el lisp/emacs-lisp/eieio-custom.el: Require eieio-base to silence warning 2025-04-07 00:10:42 -04:00
eieio-datadebug.el Delete redundant lambdas around unary functions 2025-02-11 19:04:00 +01:00
eieio-opt.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
eieio-speedbar.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
eieio.el (eieio-backward-compatibility): Set to warn (bug#77612) 2025-04-17 00:04:04 -04:00
eldoc.el Eldoc: Run eldoc-display-functions with original buffer (bug#78530) 2025-07-09 19:28:45 -07:00
elp.el Prefer incf to cl-incf in emacs-lisp/*.el 2025-02-23 00:38:22 +01:00
ert-font-lock.el Clean up ert-font-lock error messages 2025-03-07 15:58:08 +01:00
ert-x.el (internal--c-header-file-path): Move to ffap.el 2025-02-28 17:03:21 -05:00
ert.el ; Fix last change 2025-06-18 21:08:30 +02:00
ewoc.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
faceup.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
find-func.el Merge from origin/emacs-30 2025-05-24 06:55:24 -04:00
float-sup.el Remove variable aliases obsolete since Emacs 23.2 2025-03-11 21:20:38 +01:00
generate-lisp-file.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
generator.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
generic.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
gv.el Add new gv place definitions 2025-06-29 07:29:25 +03:00
helper.el Use 'help-key' function in more places 2025-03-18 00:16:29 +01:00
hierarchy.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
icons.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
inline.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
let-alist.el Merge from origin/emacs-30 2025-02-01 07:39:56 -05:00
lisp-mnt.el ; Delete redundant defvar 2025-02-11 08:42:24 +01:00
lisp-mode.el (lisp-imenu-generic-expression): Add oclosure-define 2025-06-03 16:03:27 -04:00
lisp.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
loaddefs-gen.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
macroexp.el Preserve source position of macro calls in macro expansions 2025-07-13 20:28:51 +00:00
map-ynp.el Fix 'save-some-buffers' when file name has embedded '%' 2025-06-07 16:35:42 +03:00
map.el Use 'hash-table-contains-p' in a few places 2025-03-29 14:59:44 +01:00
memory-report.el Prefer incf to cl-incf in emacs-lisp/*.el 2025-02-23 00:38:22 +01:00
multisession.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
nadvice.el (advice--make-nadvice-docstring): Rename 2025-03-03 22:18:02 -05:00
oclosure.el cl-types: Integrate into CL-Lib 2025-05-05 23:18:56 -04:00
package-vc.el Expand DIR arg on `package-vc-install-from-checkout' 2025-07-01 22:04:45 +02:00
package.el Add public interfaces for accessing builtin package info (Bug#78844) 2025-07-12 10:03:50 +03:00
pcase.el Implement new autoload macro expansion declare form 2025-08-10 18:14:23 -04:00
pp.el Merge from origin/emacs-30 2025-06-21 06:26:10 -04:00
radix-tree.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
range.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
re-builder.el Fix capitalization ELisp -> Elisp 2025-03-12 09:38:33 +08:00
regexp-opt.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
regi.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ring.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rmc.el Delete redundant lambdas around unary functions 2025-02-11 19:04:00 +01:00
rx.el Make the rx eval form use lexical binding when active 2025-02-17 16:24:53 +01:00
seq.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
shadow.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
shortdoc.el * lisp/emacs-lisp/shortdoc.el (sequence): Add 'seq-doseq'. 2025-07-31 10:33:11 +02:00
shorthands.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
smie.el lisp/emacs-lisp/smie.el (smie-config-show-indent): Tweak message 2025-03-18 08:42:42 -04:00
subr-x.el Clean up text properties in 'visual-wrap-prefix-mode' 2025-06-10 22:09:26 -07:00
syntax.el Prefer incf to cl-incf in emacs-lisp/*.el 2025-02-23 00:38:22 +01:00
tabulated-list.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tcover-ses.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
testcover.el Remove redundant constant nil argument to gethash 2025-03-29 14:59:09 +01:00
text-property-search.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
thunk.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
timer-list.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
timer.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tq.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
trace.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
track-changes.el lisp/emacs-lisp/track-changes.el: Make GNU ELPA release 2025-03-12 01:17:34 +01:00
unsafep.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
vtable.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
warnings.el Merge from origin/emacs-30 2025-07-12 05:25:02 -04:00