mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Extend the syntax of `interactive' to list applicable modes
* doc/lispref/commands.texi (Using Interactive): Document the extended `interactive' form. * doc/lispref/loading.texi (Autoload): Document list-of-modes form. * lisp/emacs-lisp/autoload.el (make-autoload): Pick the list of modes from `interactive' out of the functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Allow for the extended `interactive' form. * src/callint.c (Finteractive): Document the extended form. * src/data.c (Finteractive_form): Return the interactive form in the old format (even when there's an extended `interactive') to avoid having other parts of Emacs be aware of this. (Fcommand_modes): New defun. * src/emacs-module.c (GCALIGNED_STRUCT): Allow for modules to return command modes. * src/lisp.h: New function module_function_command_modes.
This commit is contained in:
parent
8d517daf77
commit
58e0c8ee86
11 changed files with 179 additions and 28 deletions
|
|
@ -510,6 +510,9 @@ specification is not given here; it's not needed unless the user
|
|||
actually calls @var{function}, and when that happens, it's time to load
|
||||
the real definition.
|
||||
|
||||
If @var{interactive} is a list, it is interpreted as a list of modes
|
||||
this command is applicable for.
|
||||
|
||||
You can autoload macros and keymaps as well as ordinary functions.
|
||||
Specify @var{type} as @code{macro} if @var{function} is really a macro.
|
||||
Specify @var{type} as @code{keymap} if @var{function} is really a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue