Our dear user does
C-h c space
and gets
SPC runs the command self-insert-command
Then he tries
(global-set-key 'SPC 'forward-char)
and gets
Invalid (FSF Emacs) key format (see doc of define-key): SPC
``WTF?'', he says.
XEmacs, to be ``friendly'', uses a short form of the name of the key
(SPC instead of space), but then doesn't allow SPC to be used when
defining keys. This has bugged me for years.
Why not
- accept FSF key formats and any formats XEmacs currently prints out
for the purposes of define-key and friends
- always print out key descriptions in the preferred form that
define-key currently accepts. This would mean, for example, that if
the user types C-x 4 and pauses, he would see this prompt in the
echo area:
(control x) ?4 -
Admittedly, C-x 4 seems like a friendlier description, but it can't
be used to communicate back to Emacs, and it's unambiguous and
consistent.
It's never been entirely clear to me why the macro `kbd' exists,
except perhaps for cross-Emacs portability.
Martin