Subject: bug#5364: 23.1.91; execute-extended-command should do like FFAP

From: Stefan Monnier <[email-masked]>
Date: Thu, 14 Jan 2010 21:20:27 -0500

> -       1, 1, "P",
> +       2, 2,
> +       "(list current-prefix-arg \
> +    (minibuffer-with-setup-hook \
> +        (lambda () \
> +          (set (make-local-variable 'minibuffer-default-add-function) \
> +               (lambda () \
> +                 (with-current-buffer (window-buffer \
> +                                       (minibuffer-selected-window)) \
> +                   (and (commandp (function-called-at-point)) \
> +                        (format \"%S\" (function-called-at-point))))))) \
> +      (completing-read (concat \
> +                        (cond \
> +                         ((eq current-prefix-arg '-) \"- \") \
> +                         ((and (consp current-prefix-arg) \
> +                               (eq (car current-prefix-arg) 4)) \"C-u \") \
> +                         ((and (consp current-prefix-arg) \
> +                               (integerp (car current-prefix-arg))) \
> +                          (format \"%d \" (car current-prefix-arg))) \
> +                         ((integerp current-prefix-arg) \
> +                          (format \"%d \" current-prefix-arg))) \
> +                        (key-description (this-single-command-keys)) \
> +                        \" \") \
> +                       obarray 'commandp t nil \
> +                       'extended-command-history)))",
>         doc: /* Read function name, then read its arguments and call it.

The Elisp code looks OK, except it should be in the C file.  Please move
it to simple.el where we can edit it with edebug, font-lock, eldoc, ...

        Stefan