summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-03-19 15:11:15 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-03-19 15:11:37 +0100
commit71b8f1fc635d9bbe00ca89457065e0c83456ac43 (patch)
tree49edc7bebd20340555baf2a28ef8a4dcd05504db /src/alloc.c
parentc79e0188e849715a7c4dc306c93ad8d0b3517d32 (diff)
downloademacs-71b8f1fc635d9bbe00ca89457065e0c83456ac43.tar.gz
emacs-71b8f1fc635d9bbe00ca89457065e0c83456ac43.tar.bz2
emacs-71b8f1fc635d9bbe00ca89457065e0c83456ac43.zip
Make `command-modes' work for (native-compiled) subrs, too
* lisp/emacs-lisp/comp.el (comp-func): Add a command-modes slot. (comp-spill-lap-function, comp-intern-func-in-ctxt): Fill it. (comp-emit-for-top-level, comp-emit-lambda-for-top-level): Use it. * src/alloc.c (mark_object): Mark the command_modes slot. * src/comp.c (make_subr): Add a command_modes parameter. (Fcomp__register_lambda): Use it. (Fcomp__register_subr): Ditto. * src/data.c (Fcommand_modes): Output the command_modes data for subrs (bug#54437). * src/lisp.h (GCALIGNED_STRUCT): Add a command_modes slot. * src/pdumper.c (dump_subr): Update hash. (dump_subr): Dump the command_modes slot.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index c19e3dabb6e..b0fbc91fe50 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6844,6 +6844,7 @@ mark_object (Lisp_Object arg)
set_vector_marked (ptr);
struct Lisp_Subr *subr = XSUBR (obj);
mark_object (subr->native_intspec);
+ mark_object (subr->command_modes);
mark_object (subr->native_comp_u);
mark_object (subr->lambda_list);
mark_object (subr->type);