Prev: Completion Up: Minibuffer

Repeating Minibuffer Commands

   Every command that uses the minibuffer at least once is recorded on a
special history list, together with the values of the minibuffer
arguments, so that you can repeat the command easily.  In particular,
every use of `Meta-x' is recorded, since `M-x' uses the minibuffer to
read the command name.

`C-x ESC'
     Re-execute a recent minibuffer command

     Within `C-x ESC', move to previous recorded command

     Within `C-x ESC', move to the next (more recent) recorded command

`M-x list-command-history'
     Display the entire command history, showing all the commands `C-x
     ESC' can repeat, most recent first.

   `C-x ESC' is used to re-execute a recent command that used the
minibuffer. With no argument, it repeats the last command.  A numeric
argument specifies which command to repeat; 1 means the last one, and
larger numbers specify earlier commands.

   `C-x ESC' works by turning the previous command into a Lisp
expression and then entering a minibuffer initialized with the text for
that expression.  If you type just RET, the command is repeated as
before.  You can also change the command by editing the Lisp expression.
The expression you finally submit will be executed.  The repeated
command is added to the front of the command history unless it is
identical to the most recently executed command already there.

   Even if you don't understand Lisp syntax, it will probably be obvious
which command is displayed for repetition.  If you do not change the
text, you can be sure the command will repeat exactly as before.

   If you are in the minibuffer for `C-x ESC' and the command shown to
you is not the one you want to repeat, you can move around the list of
previous commands using `M-n' and `M-p'.  `M-p' replaces the contents
of the minibuffer with the next earlier recorded command, and `M-n'
replaces it with the next later command.  After finding the desired
previous command, you can edit its expression and then resubmit it by
typing RET.  Any editing you have done on the command to be repeated is
lost if you use `M-n' or `M-p'.

   `M-n' and `M-p' are specially defined within `C-x ESC' to run the
commands `previous-complex-command' and `next-complex-command'.

   The list of previous commands using the minibuffer is stored as a
Lisp list in the variable `command-history'.  Each element of the list
is a Lisp expression which describes one command and its arguments.
Lisp programs can reexecute a command by feeding the corresponding
`command-history' element to `eval'.

automatically generated by info2www