emacs-devel
[Top][All Lists]
Advanced

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

Re: kbd vs read-key-sequence


From: Richard Stallman
Subject: Re: kbd vs read-key-sequence
Date: Fri, 30 Mar 2007 17:22:07 -0400

      And, although
    >     Encoded-kbd-mode can decode \351 to é, it can't decode
    >     M-\351 to M-é.

    > That sounds like a clear bug in encoded-kbd-mode.

    Why do you think so?

Because it gives the wrong output, and the result is incorrect
execution.

      The task of encoded-kbd-mode is to do
    "decode-coding" according to keyboard-coding-system, and
    "decode-coding" is to decode a byte sequence into a
    character sequence.

In some sense, yes.

                         But M-\351 is not a byte.

So what?  Some sequence of bytes comes in when the user
types M-é.  What sequence is it?

    > Can you fix it easily?

    It's possible but not easy.

Can you explain why it is hard?

    On Windows, to bind a non-ASCII character with some modifier
    to a command, you must specify a raw byte code.  For
    instance, if you want to bind meta-a-grave to a command:
      (global-set-key [?\M-\340] ...)
    That is for the case of Latin-1 environment where the byte
    code of a-grave is \340.

That is really ugly.   Documenting a bug should be the last resort.
First try fixing it.




reply via email to

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