[Top][All Lists]

[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: Sun, 04 Mar 2007 21:55:32 -0500

    On the other side of the problem we have code written in the .emacs file
    which tries to bind something to this key.  To work, this has to satisfy
    the condition that when Emacs loads the .emacs file, the key it finds in the
    define-key call corresponds to the form of the event after
    key-translation-map (but before unibyte-char-to-multibyte if applicable).

Except for the case of unibyte characters, that is the same as the
character that gets inserted in the buffer if you type the character,
right?  So it should be possible to type in the character code that
C-x = shows you, right?

And you should also be able to insert that character in .emacs,
then save it in whichever coding system.  Why won't that work?

    And if you want it to work with modifiers, it's yet a bit more interesting
    because the base-event is not always decoded

I don't understand that.  What does it mean to "decode the base-event"?

Anyway, if you want to bind a character with modifiers, you can just use
a construct in .emacs that applies the modifier to the desired base
character, such as \M- in a string, or (meta CHAR).

Is there a case where that doesn't work?

reply via email to

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