On Fri, Dec 22, 2017 at 7:58 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
On Dez 17 2017, Robert Weiner <rsw@gnu.org> wrote:

> + (defun minibuffer-history-edit-element (elt)
> +   "Automatically simplify ELT if possible, e.g. removing eval-expression."
> +   (or (and (consp elt) (eq (car elt) 'eval-expression)
> +        ;; Remove eval-expression wrapper and leave just the expression.
> +        (cadadr elt))

That mishandles self-evaluating expressions, they are not wrapped with
quote.

​You are correct.  This version resolves that issue and changes
repeat-complex-command to use eval-expression instead of
funcall-interactively to handle expressions rather than function
calls, including properly redoing:

   (quote emacs-version)

for example.

See attached.

Bob