aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index 5177a7cc649..50d4374abdd 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1031,9 +1031,17 @@ The value, if non-nil, is a list of mode name symbols. */)
1031 if (NILP (fun)) 1031 if (NILP (fun))
1032 return Qnil; 1032 return Qnil;
1033 1033
1034 /* Use a `command-modes' property if present, analogous to the
1035 function-documentation property. */
1034 fun = command; 1036 fun = command;
1035 while (SYMBOLP (fun)) 1037 while (SYMBOLP (fun))
1036 fun = Fsymbol_function (fun); 1038 {
1039 Lisp_Object modes = Fget (fun, Qcommand_modes);
1040 if (!NILP (modes))
1041 return modes;
1042 else
1043 fun = Fsymbol_function (fun);
1044 }
1037 1045
1038 if (COMPILEDP (fun)) 1046 if (COMPILEDP (fun))
1039 { 1047 {
@@ -4056,6 +4064,8 @@ syms_of_data (void)
4056 DEFSYM (Qinteractive_form, "interactive-form"); 4064 DEFSYM (Qinteractive_form, "interactive-form");
4057 DEFSYM (Qdefalias_fset_function, "defalias-fset-function"); 4065 DEFSYM (Qdefalias_fset_function, "defalias-fset-function");
4058 4066
4067 DEFSYM (Qbyte_code_function_p, "byte-code-function-p");
4068
4059 defsubr (&Sindirect_variable); 4069 defsubr (&Sindirect_variable);
4060 defsubr (&Sinteractive_form); 4070 defsubr (&Sinteractive_form);
4061 defsubr (&Scommand_modes); 4071 defsubr (&Scommand_modes);