[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-h b uses non-standard key descriptions

From: Kim F. Storm
Subject: Re: C-h b uses non-standard key descriptions
Date: 30 Mar 2004 17:27:49 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     Press C-h b in the scratch buffer and try to find the binding for M-f
>     in the list.  It is not there.  It is only present as
>     ESC f
> This is a relic of a decision made at the beginning of the history of
> GNU Emacs.  ESC f and M-f are supposed to be equivalent.  The way
> Emacs implements this is by converting M-f into ESC f internally.  The
> bindings for meta characters are actually stored in the ESC prefix
> definition.
> This is not very clean, and I would be happy in principle if we
> changed it around, so that the real bindings are for meta characters
> directly, and ESC followed by another character were converted somehow
> into a single meta character.

For this to work with existing bindings, e.g. (define-key global-map
"\er" ...) should really bind M-r.

But then what about (define-key function-key-map "\eOP" ...)  ?  
If we blindly made a binding for M-O P here, function keys would
stop working.

I agree the current situation is not very clean, but on the other hand
it works and I think it is non-trivial to find a clean way to change
this.  So unless there are any real benefits from changing this, I
think we should it as is.

Instead, we could just change key-description to DTRT...
E.g. so that (key-description "\er") => M-r

It would definitely be simpler to do that.  
And AFAICS, it would fix C-h b as well.

Kim F. Storm  http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]