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

17.3 Interactive Calling Specification

The spec argument to interactive or define-command defines the argument values applied to the command when it is called interactively. It may be one of:

nil or undefined

No arguments are given to the command.

A string

It consists of zero or more lines (each separated by a newline character). Each line defines how to compute one argument value. The first one or two characters of each line is a prefix defining exactly how to compute the argument, the rest of the line is an optional argument which some prefixes may use. See below for a list of prefixes. A null line produces an argument value of nil.

Anything else

The form is evaluated and expected to return a list of arguments to apply to the command.

The currently available prefixes are,


The event which caused this command to be invoked.


The event which caused this command, cooked into a string.


The prefix argument as a number, this will be 1 if no prefix argument has been entered.


The raw prefix argument.


The symbol t.


The window which currently has the input focus, or nil if no window is focused.


The result of calling the current-event-window function.


The result of calling the current-event-window function, or if this returns nil or root, the currently focused window.