From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.bugs Subject: Re: define-key #2 ---> ineffective if key is bound... Date: Tue, 21 May 2002 13:33:18 GMT Organization: Global Online Japan // Exodus Communications KK. Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <87k7pxpqw2.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <200205202134.g4KLYXI26067@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021988155 19778 127.0.0.1 (21 May 2002 13:35:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 21 May 2002 13:35:55 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17A9nv-00058t-00 for ; Tue, 21 May 2002 15:35:55 +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 17A9oP-0002yo-00; Tue, 21 May 2002 09:36:25 -0400 Original-Received: from mailbox2.ucsd.edu ([132.239.1.54]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17A9lU-0002gS-00 for ; Tue, 21 May 2002 09:33:29 -0400 Original-Received: from smtp01.fields.gol.com (smtp01.fields.gol.com [203.216.5.131]) by mailbox2.ucsd.edu (8.12.1/8.12.1) with ESMTP id g4LDXLmd025564 for ; Tue, 21 May 2002 06:33:22 -0700 (PDT) Original-Received: from nnrp.gol.com ([203.216.7.70]) by smtp01.fields.gol.com with esmtp (Magnetic Fields) id 17A9lR-00010d-00 for ; Tue, 21 May 2002 22:33:21 +0900 Original-Received: by nnrp.gol.com (8.10.0.Beta6/8.9.1/891-NEWS-P) id g4LDXJh14659; Tue, 21 May 2002 22:33:19 +0900 (JST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug System-Type: i686-pc-linux-gnu Original-Lines: 34 Original-NNTP-Posting-Host: 203.216.25.206 Original-X-Complaints-To: abuse@gol.com Original-X-Trace: nnrp.gol.com 1021987998 203.216.25.206 (Tue, 21 May 2002 22:33:18 JST) Original-NNTP-Posting-Date: Tue, 21 May 2002 22:33:18 JST X-Abuse-Complaints: abuse@gol.com Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1496 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1496 "D. Goel" writes: > <-- thus, if the user wants to shuffle his O with P, then > key-translation-map (rather than keyboard-translate-table) is the way to > go. In the current version, it seems that there is no way for me to > shuffle O with P without side-effects, either by using > keyboard-translate-table or by using key-translation-map, because in > both cases, the function-key-map's up-arrow conversion (and other > arrows) gets broken. I agree with you, mostly because my mental model of the relationship between these various translation-maps (function-key-map -> key-translation-map -> normal keymaps) is a pipeline, where later stages cannot influence earlier ones. However, in practice, this is not true, except for simple cases, because function-key-map and key-translation-map work by modifying the tail of a growing data structure, character by character, and pay attention to more than one character at the end. I suppose it could be worked around, by having two copies of the current input sequence, one which holds the original input events, and which function-key-map also modifies, which would be copied before key-translation-map was applies (and presumably would have to be re-run from either the beginning or some other synchronization point if function-key-map actually shrunk the input). But the key-lookup machinery seems very complicated and fragile to me, so it may not be so easy to make such a change... -Miles -- `...the Soviet Union was sliding in to an economic collapse so comprehensive that in the end its factories produced not goods but bads: finished products less valuable than the raw materials they were made from.' [The Economist]