From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Old CUA and new keyboard.c (was: Problem with latest CVS version of keyboard.c (solved) ) Date: 14 Jun 2002 01:44:34 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xofeehhgd.fsf@kfs2.cua.dk> References: <00D3E07D.7CEA4D23.00A66750@netscape.net> <200206121519.g5CFJRr18872@rum.cs.yale.edu> <5xelfcup7g.fsf@kfs2.cua.dk> <200206122231.g5CMVPq21188@rum.cs.yale.edu> <200206122349.g5CNn2221537@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1024008445 6616 127.0.0.1 (13 Jun 2002 22:47:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Jun 2002 22:47:25 +0000 (UTC) Cc: emacs-devel@gnu.org, ponced16@netscape.net (David Ponce) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17IdNF-0001ib-00 for ; Fri, 14 Jun 2002 00:47:25 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17Idlj-0001Rd-00 for ; Fri, 14 Jun 2002 01:12:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17IdLD-00036l-00; Thu, 13 Jun 2002 18:45:19 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17IdJp-0002iZ-00 for ; Thu, 13 Jun 2002 18:43:53 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 82F247C016; Thu, 13 Jun 2002 22:43:51 +0000 (GMT) Original-To: "Stefan Monnier" In-Reply-To: <200206122349.g5CNn2221537@rum.cs.yale.edu> Original-Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4850 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4850 "Stefan Monnier" writes: > > > I was wondering why you need to wait for the next character after a > > > C-x or C-c to see if they start a function key... I don't think those > > > specific keys will ever do that, so maybe you should only delay the > > > use of key-translation-map in case the key is actually a potential > > > candidate for starting a function key. > > > > That sounds like a good approach. I'll see what I can do with it. > > Actually, C-x is already bound in function-key-map in the dumped > Emacs because of the `C-x @ m', `C-x @ a', ... feature. So in the future, we cannot remap [C-x] through key-translation-map. I don't know whether that's critical. It's not important for me anymore. > > The change in the code is pretty simple and feels right, so I might > install it when I've tested it some more, but it doesn't solve the > problem at hand. > I doubt anyone will notice! > It seems there's a fundamental incompatibility here. > On the one hand key-translation-map needs to be applied as soon as C-x > is pressed and on the other, it should not be applied if the user hits > C-x @ m. > > Anybody has a good idea how to reconcile those two constraints ? > Why did cua use key-translation-map rather than a minor-mode keymap ? Because I didn't know better at the time... The tricky part was to differentiate between three cases: 1) Normal C-x/C-c when no highlighed region 2) The C-x/C-c cut© functionality on highlighted region 3) Retaining the normal prefix meaning if C-x X / C-c X was typed quickly even with highlighted region. Since key-translation-map allowed mapping to a function, it seemed logical to use a function which handled all of these situations. The new cua does indeed use (several) minor-mode keymaps to deal with this. -- Kim F. Storm http://www.cua.dk