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: Wed, 28 Jul 2004 10:52:07 +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 Monnier <address@hidden> writes:

>>  I'm now working on changing encoded-kdb.el to setup key-translation-map (I
>>  think it is more suitable than function-key-map).

> I'd tend to agree that key-translation-map is more suitable, although using
> function-key-map would have the advantage that people's old bindings like
> (global-set-key [241] 'foobar) would still work.

> OTOH such bindings are fundamentally wrong IMNSHO (although it's the "only"
> thing that works in older Emacsen).

On X window, (global-set-key [241] 'foobar) won't work
anymore because one can't type ?\241 directly.  When one
types a key that generates ?\241, X maps it to some keysym,
and Emacs maps it to a multibyte character by
x-keysym-table.


By the way, I'm puzzled with the handling of
key-translation-map.

(define-key key-translation-map "\e$B" [?a])

With above, I think key sequence ESC $ B should be mapped to
?a and thus inserts ?a.  But, when I type ESC $, ispell-word
is invoked.

(lookup-key key-translation-map "\e$B") returns [97].

(define-key key-translation-map "\C-x$B" [?a])
also doesn't work, but
(define-key key-translation-map "\C-x9B" [?a])
works.

Do I misunderstand key-translation-map?

---
Ken'ichi HANDA
address@hidden




reply via email to

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