From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: capslock changes control characters? Date: Thu, 06 Mar 2008 20:20:29 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1204802524 13746 80.91.229.12 (6 Mar 2008 11:22:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 11:22:04 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, christopher.ian.moore@gmail.com, monnier@iro.umontreal.ca, rms@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 06 12:22:30 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXEB9-0003kR-2V for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 12:22:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXEAa-0006Kl-Fe for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 06:21:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXE9j-0005M2-1j for emacs-devel@gnu.org; Thu, 06 Mar 2008 06:20:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXE9h-0005J9-QR for emacs-devel@gnu.org; Thu, 06 Mar 2008 06:20:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXE9h-0005In-2o for emacs-devel@gnu.org; Thu, 06 Mar 2008 06:20:57 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXE9g-0007uq-RR for emacs-devel@gnu.org; Thu, 06 Mar 2008 06:20:56 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JXE9g-0007eS-HQ for emacs-pretest-bug@gnu.org; Thu, 06 Mar 2008 06:20:56 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JXE9c-0007t2-DT for emacs-pretest-bug@gnu.org; Thu, 06 Mar 2008 06:20:55 -0500 Original-Received: from mx1s.aist.go.jp ([150.29.246.134]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXE9b-0007ri-La; Thu, 06 Mar 2008 06:20:52 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1s.aist.go.jp with ESMTP id m26BKVk6014372; Thu, 6 Mar 2008 20:20:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m26BKVIr016009; Thu, 6 Mar 2008 20:20:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m26BKTDL016511; Thu, 6 Mar 2008 20:20:29 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1JXE9F-00060b-LM; Thu, 06 Mar 2008 20:20:29 +0900 In-reply-to: (message from Andreas Schwab on Wed, 05 Mar 2008 17:50:09 +0100) 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) X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91485 gmane.emacs.pretest.bugs:21427 Archived-At: In article , Andreas Schwab writes: > Stefan Monnier writes: >>> 2008-03-05 Kenichi Handa > > >>> * 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