Node: New-style Command Definition, Next: Interactive Calling Specification, Previous: Old-style Command Definition, Up: Commands
The new syntax does not depend on special magic in defun.
Instead, it uses keyword arguments to indicate the calling
specification and other properties.
| define-command name fun #!key spec type doc doc-key class | Function |
|
Define a window managed command called name (a symbol). The
function fun will be called to execute the command.
spec and type may be used to define the arguments expected by the command; spec is an interactive specification and type is a custom-type specification. See Interactive Calling Specification. doc is the documentation string associated with the command.
The command-documentation may be stored in the doc file, rather than
in the code itself; if it exists, the doc-key will be used to
look up the doc file entry. If both arguments are provided, both will
be stored. But the class is an annotation for the command. It allows the
definition to mark the class as |
| define-command-to-screen name fun #!key spec type doc doc-key class | Function |
As define-command, but any printed output of fun is sent
to the screen.
|
| autoload-command name module #!key spec type doc doc-key class | Function |
|
Record that loading the module called module (a symbol) will provde a
command called name.
The keyword values have the same meanings as for
|