From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Customizing key bindings Date: 09 Sep 2002 10:52:34 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: References: <87ofbji88u.fsf@emacswiki.org> <200209021705.g82H50d07442@rum.cs.yale.edu> <200209022324.g82NOoO08761@rum.cs.yale.edu> <20020903130247.GA6318@gnu.org> <20020903173120.GA29981@gnu.org> <87ptvttnyo.fsf@emacswiki.org> <200209061736.g86HaDi00352@rum.cs.yale.edu> <874rd1ki2s.fsf_-_@emacswiki.org> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031536481 26987 127.0.0.1 (9 Sep 2002 01:54:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2002 01:54:41 +0000 (UTC) Cc: alex@emacswiki.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17oDlA-000719-00 for ; Mon, 09 Sep 2002 03:54:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17oEKs-0003At-00 for ; Mon, 09 Sep 2002 04:31:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oDlA-0002Oe-00; Sun, 08 Sep 2002 21:54:40 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17oDjL-0002Ke-00 for emacs-devel@gnu.org; Sun, 08 Sep 2002 21:52:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17oDjJ-0002KS-00 for emacs-devel@gnu.org; Sun, 08 Sep 2002 21:52:46 -0400 Original-Received: from tyo201.gate.nec.co.jp ([210.143.35.51]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oDjI-0002K0-00; Sun, 08 Sep 2002 21:52:44 -0400 Original-Received: from mailgate4.nec.co.jp ([10.7.69.197]) by TYO201.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id g891qcE07206; Mon, 9 Sep 2002 10:52:38 +0900 (JST) Original-Received: from mailsv.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id g891qb506004; Mon, 9 Sep 2002 10:52:37 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv.nec.co.jp (8.11.6/3.7W-MAILSV-NEC) with ESMTP id g891qZe09456; Mon, 9 Sep 2002 10:52:35 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.10.2+Sun/3.7Wlsi_mx_6.0) with ESMTP id g891qZs27655; Mon, 9 Sep 2002 10:52:35 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 7538B3723; Mon, 9 Sep 2002 10:52:34 +0900 (JST) Original-To: rms@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 27 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7731 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7731 Richard Stallman writes: > 3. Load foo-extra or call a hook that uses define-key to change the > binding for the same key to C. > 4. Customize the keymap. I think it is ok to see binding C, because > after all that is what happens to variables as well. The problem > is that when the user removes the binding for that key, we revert > to binding A, instead of B. > > I think my two-keymap solution, with a modified define-key, would > handle this right. Please elaborate. What is `my two-keymap solution'? How is it different from Per's? > (It would also prevent C from being visible while the customization is > in effect.) ... which is the wrong thing in the case of a hook. [Note that if `foo-extra' uses a `defkeymap' variant of some sort to define C (which it probably would, if `foo' does too), then that could be used to make custom aware of the A->B change.] -Miles -- "Most attacks seem to take place at night, during a rainstorm, uphill, where four map sheets join." -- Anon. British Officer in WW I