summaryrefslogtreecommitdiff
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. */)
if (NILP (fun))
return Qnil;
+ /* Use a `command-modes' property if present, analogous to the
+ function-documentation property. */
fun = command;
while (SYMBOLP (fun))
- fun = Fsymbol_function (fun);
+ {
+ Lisp_Object modes = Fget (fun, Qcommand_modes);
+ if (!NILP (modes))
+ return modes;
+ else
+ fun = Fsymbol_function (fun);
+ }
if (COMPILEDP (fun))
{
@@ -4056,6 +4064,8 @@ syms_of_data (void)
DEFSYM (Qinteractive_form, "interactive-form");
DEFSYM (Qdefalias_fset_function, "defalias-fset-function");
+ DEFSYM (Qbyte_code_function_p, "byte-code-function-p");
+
defsubr (&Sindirect_variable);
defsubr (&Sinteractive_form);
defsubr (&Scommand_modes);