Next: Interactive Examples, Previous: Using Interactive, Up: Defining Commands
interactive
The code character descriptions below contain a number of key words, defined here as follows:
completing-read
(see Completion). ? displays a list of possible completions.
Even though the code letter doesn't use a prompt string, you must follow
it with a newline if it is not the last code character in the string.
Here are the code character descriptions for use with interactive
:
fboundp
). Existing,
Completion, Prompt.
commandp
). Existing,
Completion, Prompt.
default-directory
(see File Name Expansion).
Existing, Completion, Default, Prompt.
You use ‘e’ for mouse events and for special system events (see Misc Events). The event list that the command receives depends on the event. See Input Events, which describes the forms of the list for each event in the corresponding subsections.
You can use ‘e’ more than once in a single command's interactive
specification. If the key sequence that invoked the command has
n events that are lists, the nth ‘e’ provides the
nth such event. Events that are not lists, such as function keys
and ASCII characters, do not count where ‘e’ is concerned.
default-directory
. Existing, Completion, Default,
Prompt.
nil
as
the argument's value. No I/O.
If ‘k’ reads a key sequence that ends with a down-event, it also reads and discards the following up-event. You can get access to that up-event with the ‘U’ code character.
This kind of input is used by commands such as describe-key
and
global-set-key
.
nil
. Can be used after a ‘k’ or
‘K’ argument to get the up-event that was discarded (if any)
after ‘k’ or ‘K’ read a down-event. If no up-event has been
discarded, ‘U’ provides nil
as the argument. No I/O.
custom-variable-p
). This reads the variable using
read-variable
. See Definition of read-variable. Existing,
Completion, Prompt.
nil
. See Coding Systems. Completion,
Existing, Prompt.
nil
as the
argument value. Completion, Existing, Prompt.