edit-and-eval-command

edit-and-eval-command is a compiled Lisp function in `simple.el'.

(edit-and-eval-command PROMPT COMMAND)

Prompting with PROMPT, let user edit COMMAND and eval result.
COMMAND is a Lisp expression. Let user edit that expression in
the minibuffer, then read and evaluate the result.