Next: , Previous: , Up: Evaluate Emacs Lisp Expressions   [Index]


F.1.5 Eval Expression

eval-expression

M-:

Evaluate EXP and print value in the echo area.

When called interactively, read an Emacs Lisp expression and evaluate it. If invoked with the universal argument ‘C=u’, the output of the expression is inserted into the buffer.

It evaluates code in the context of the buffer it is invoked from.

repeat-complex-command

C-x M-:

Edit and re-evaluate last complex command, or ARGth from last. A complex command is one that used the minibuffer. The command is placed in the minibuffer as a Lisp form for editing. The result is executed, repeating the command as changed.

You can use the minibuffer history commands M-n and M-p to get different commands to edit and resubmit.