This will likely be highly controversial.
And a change to a user interface going back to the first emacs
version.
But it seems to me that
M-x
is a prompt designed for a 300-baud terminal. Today we can do better.
What does M-x mean anyways? It might mean that the user pressed ESC
followed by x, but that isn't necessarily true if the user has
(global-set-key 'f9 'execute-extended-command)
Why not just tell the user what's really going on?
The more I look at my patch, the more I like it.
Index: cmdloop.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/cmdloop.el,v
retrieving revision 1.9.2.2
diff -u -r1.9.2.2 cmdloop.el
--- cmdloop.el 1999/09/09 10:34:02 1.9.2.2
+++ cmdloop.el 1999/09/14 11:12:54
@@ -295,27 +295,11 @@
value of the current raw prefix argument, or the value of PREFIX-ARG
when called from Lisp."
(interactive "P")
- ;; Note: This doesn't hack "this-command-keys"
- (let ((prefix-arg prefix-arg))
- (setq this-command (read-command
- ;; Note: this has the hard-wired
- ;; "C-u" and "M-x" string bug in common
- ;; with all GNU Emacs's.
- ;; (i.e. it prints C-u and M-x regardless of
- ;; whether some other keys were actually bound
- ;; to `execute-extended-command' and
- ;; `universal-argument'.
- (cond ((eq prefix-arg '-)
- "- M-x ")
- ((equal prefix-arg '(4))
- "C-u M-x ")
- ((integerp prefix-arg)
- (format "%d M-x " prefix-arg))
- ((and (consp prefix-arg)
- (integerp (car prefix-arg)))
- (format "%d M-x " (car prefix-arg)))
- (t
- "M-x ")))))
+ (setq this-command
+ (read-command
+ (if prefix-arg
+ (format "Run command with prefix argument `%S': " prefix-arg)
+ "Run command: ")))
(if (and teach-extended-commands-p
(interactive-p))