From: Kenichi Handa <handa@m17n.org>
To: Andreas Schwab <schwab@suse.de>
Cc: emacs-pretest-bug@gnu.org, christopher.ian.moore@gmail.com,
monnier@iro.umontreal.ca, rms@gnu.org
Subject: Re: capslock changes control characters?
Date: Thu, 06 Mar 2008 20:20:29 +0900 [thread overview]
Message-ID: <E1JXE9F-00060b-LM@etlken.m17n.org> (raw)
In-Reply-To: <jefxv5qfni.fsf@sykes.suse.de> (message from Andreas Schwab on Wed, 05 Mar 2008 17:50:09 +0100)
In article <jefxv5qfni.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> 2008-03-05 Kenichi Handa <handa@ni.aist.go.jp>
> >
>>> * 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
handa@ni.aist.go.jp
next prev parent reply other threads:[~2008-03-06 11:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 18:45 capslock changes control characters? Chris Moore
2008-02-24 22:30 ` Richard Stallman
2008-03-03 10:38 ` David Reitter
2008-03-03 14:02 ` Stefan Monnier
2008-03-03 14:49 ` Andreas Schwab
2008-03-04 13:15 ` Chris Moore
2008-03-05 5:13 ` Kenichi Handa
2008-03-05 16:18 ` Stefan Monnier
2008-03-05 16:50 ` Andreas Schwab
2008-03-06 11:20 ` Kenichi Handa [this message]
2008-03-07 23:04 ` Stefan Monnier
2008-03-10 0:54 ` Kenichi Handa
2008-03-10 3:26 ` Stefan Monnier
2008-03-16 9:15 ` Andreas Schwab
2008-03-17 0:48 ` Kenichi Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1JXE9F-00060b-LM@etlken.m17n.org \
--to=handa@m17n.org \
--cc=christopher.ian.moore@gmail.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).