emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Rebinding international characters


From: Kenichi Handa
Subject: Re: Rebinding international characters
Date: Tue, 27 Jul 2004 11:50:35 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Stefan <address@hidden> writes:

>>>  > That is very puzzling.  What does (key-binding [241]) give you?
>>>  encoded-kbd-self-insert-ccl
>>>  Can you figure out which keymap this comes from?
>>  It comes from encoded-kbd-mode

> Oh, I understand: the encoded-kbd rebinding (which implements the
> keyboard-coding-system stuff) is done as a minor-mode whereas it should be
> done at the level of key-translation-map or maybe function-key-map.

You are right (when I wrote the original of encoded-kdb.el
in Mule age, key-translation-map didn't exist).  I'm now
working on changing encoded-kdb.el to setup
key-translation-map (I think it is more suitable than
function-key-map).  It seems that the required change is not
that big, but I have two questions.

When a key translation function is called, what is the right
way to know what key invoked that function?  Is (aref
(this-single-command-keys) 0) the right way?

When a key sequence is just to change internal state
(e.g. the case ESC $ B is sent to Emacs when
keyboard-coding-system is iso-2022-jp), what should the
corresponding key translation function return?

> So the rebinding is currently visible in last-command and such stuff, so the
> test (eq this-command last-command) fails.

Yes.  Currently, [241] is bound to
encoded-kbd-self-insert-ccl.  This function at last pushes
n-tilda character in unread-command-events.  That character
is bound to self-insert-command.  So, when the above test is
executed, this-command is encoded-kbd-self-insert-ccl and
last-command is self-insert-command.

---
Ken'ichi HANDA
address@hidden





reply via email to

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