summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-02-21 22:08:01 +0100
committerAndrea Corallo <akrl@sdf.org>2021-02-21 22:08:01 +0100
commitcf1e8e792f60949e09e3ad4c53fb61b0b7628229 (patch)
tree35080229c9e3b46e5db14a2f051c001ab8c6e586 /src/data.c
parent39792cf62987ecc1a772f6a2027d6b32c70e8312 (diff)
parentd0c47652e527397cae96444c881bf60455c763c1 (diff)
downloademacs-cf1e8e792f60949e09e3ad4c53fb61b0b7628229.tar.gz
emacs-cf1e8e792f60949e09e3ad4c53fb61b0b7628229.tar.bz2
emacs-cf1e8e792f60949e09e3ad4c53fb61b0b7628229.zip
Merge remote-tracking branch 'savannah/master' into HEAD
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);