Next: , Previous: , Up: Commands   [Contents][Index]


17.4 Operations on Commands

We can extract certain information about commands.

Function: commandp symbol

Returns t if symbol is a command name.

Function: command-documentation name

Return the documentation for the command name. It returns the first documentation found by looking at (in order): the documentation property of the command; the doc file entry associated with the doc key property; or the documentation for the function with the same name.

Function: command-spec name
Function: command-type name
Function: command-class name

Return the specification, type or class (respectively) of the named command.

Function: report-commands #!optional type all

Returns the list of commands. Each element is the symbol of a command name, and they’re sorted alphabetically.

The optional argument type is for internal use. when it’s non-nil, (command-name #:type type-param) is returned for commands with “type”, instead of a symbol.

If the optional argument all is nil, returns commands only user wants, i.e. those specified by customize-command-class are included. Else, all commands are returned.