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: Kenichi Handa
Subject: Re: kbd vs read-key-sequence
Date: Mon, 02 Apr 2007 11:27:41 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Jason Rumney <address@hidden> writes:

> Stefan Monnier wrote:
> > There's no indication that doing it right (i.e. doing the coding-system
> > decoding somewhere in the w32 code which turns w32 events into elisp events)
> > is difficult.  AFAICT nobody has really tried to do it.
> >   

> Anything to do with coding-systems in C code is difficult. Especially 
> when almost every encoding on Windows involves autoloaded CCL based 
> coding-systems.

We don't have to use the mechanism of "decode-coding".
Windows code is already using MultiByteToWideChar() which
seems to convert codepage codes to Unicode character, right?
Then, can't we use it to get a Unicode character code from
keyevent(s) and do something like this?

        MultiByteToWideChar (codepage, 0, inbuf, inlen, outbuf, outlen)
        lisp_char = call2 (intern ("decode-char"), intern ("ucs"),
                            make_number (outbuf[0]));

And, in emacs-unicode-2, you don't have to call "decode-char".

---
Kenichi Handa
address@hidden




reply via email to

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