[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: capslock changes control characters?
From: |
Kenichi Handa |
Subject: |
Re: capslock changes control characters? |
Date: |
Thu, 06 Mar 2008 20:20:29 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Andreas Schwab <address@hidden> writes:
> Stefan Monnier <address@hidden> writes:
>>> 2008-03-05 Kenichi Handa <address@hidden>
> >
>>> * lread.c (Fread_char): Resolve modifiers.
>>> (Fread_char_exclusive): Likewise.
> >
>>> Previously (read-char) returned 33554441 when you type C-I
>>> (i.e. C-S-i). I changed it to return 9 (i.e. C-i). It is
>>> also changed to return 233 upon M-i instead of 134217833.
>>> They still return a code containing unresolvable modifiers.
> >
> > It looks ok, but I have some comments/questions:
> >
> > 1 - Why both with the mapping of meta? AFAIK this is only ever used
> > when manipulating keymaps using keysequences represented as strings
> > rather than vectors. So I don't think it's needed here.
> >
> > 2 - why is this needed now. It seems like this was already working fine
> > before the unicode merge without this function, so what is the change
> > that caused the problem in the first place (or in other words, how
> > did it work before)?
> (read-char) has always returned 33554441 for C-S-i. I think the
> difference is that it is no longer considered a valid character by
> char-or-string-p (ie. CHARACTERP).
Yes.
I think the current Emacs doesn't have a clear view about
when and how to resolve modifiers. For instance, S-i is
resolved to `I' by XLookupString, C-i is resolved to 9 in
make_ctrl_char. Then I think C-S-i should also be resolved
somewher before it's given to Lisp, at least before it's
given to Lisp as character.
So I resolved the modifiers in those functions than in, for
instance, char-to-string or insert.
Resolving of M-i is surely questionable, but as Emacs has
accepeted M-i upon (insert (read-char)) for long, I resolved
them too for backward compatibility.
---
Kenichi Handa
address@hidden
Re: capslock changes control characters?, Andreas Schwab, 2008/03/16