diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c index ace859d2d0c..0fa491b17a1 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -957,9 +957,17 @@ The value, if non-nil, is a list of mode name symbols. */) | |||
| 957 | if (NILP (fun)) | 957 | if (NILP (fun)) |
| 958 | return Qnil; | 958 | return Qnil; |
| 959 | 959 | ||
| 960 | /* Use a `command-modes' property if present, analogous to the | ||
| 961 | function-documentation property. */ | ||
| 960 | fun = command; | 962 | fun = command; |
| 961 | while (SYMBOLP (fun)) | 963 | while (SYMBOLP (fun)) |
| 962 | fun = Fsymbol_function (fun); | 964 | { |
| 965 | Lisp_Object modes = Fget (fun, Qcommand_modes); | ||
| 966 | if (!NILP (modes)) | ||
| 967 | return modes; | ||
| 968 | else | ||
| 969 | fun = Fsymbol_function (fun); | ||
| 970 | } | ||
| 963 | 971 | ||
| 964 | if (COMPILEDP (fun)) | 972 | if (COMPILEDP (fun)) |
| 965 | { | 973 | { |
| @@ -3981,6 +3989,8 @@ syms_of_data (void) | |||
| 3981 | DEFSYM (Qinteractive_form, "interactive-form"); | 3989 | DEFSYM (Qinteractive_form, "interactive-form"); |
| 3982 | DEFSYM (Qdefalias_fset_function, "defalias-fset-function"); | 3990 | DEFSYM (Qdefalias_fset_function, "defalias-fset-function"); |
| 3983 | 3991 | ||
| 3992 | DEFSYM (Qbyte_code_function_p, "byte-code-function-p"); | ||
| 3993 | |||
| 3984 | defsubr (&Sindirect_variable); | 3994 | defsubr (&Sindirect_variable); |
| 3985 | defsubr (&Sinteractive_form); | 3995 | defsubr (&Sinteractive_form); |
| 3986 | defsubr (&Scommand_modes); | 3996 | defsubr (&Scommand_modes); |