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: Sat, 7 Sep 2002 19:43:43 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <20020907234343.GC26845@gnu.org> References: <20020903130247.GA6318@gnu.org> <20020903173120.GA29981@gnu.org> <87ptvttnyo.fsf@emacswiki.org> <200209061736.g86HaDi00352@rum.cs.yale.edu> <874rd1ki2s.fsf_-_@emacswiki.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031442313 22693 127.0.0.1 (7 Sep 2002 23:45:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 7 Sep 2002 23:45:13 +0000 (UTC) Cc: 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 17npGJ-0005th-00 for ; Sun, 08 Sep 2002 01:45:11 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17nppU-0006nO-00 for ; Sun, 08 Sep 2002 02:21:32 +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 17npGH-00059P-00; Sat, 07 Sep 2002 19:45:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17npEw-00057l-00 for emacs-devel@gnu.org; Sat, 07 Sep 2002 19:43:46 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17npEu-00057R-00 for emacs-devel@gnu.org; Sat, 07 Sep 2002 19:43:45 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17npEu-00057K-00 for emacs-devel@gnu.org; Sat, 07 Sep 2002 19:43:44 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.10) id 17npEt-0008KM-00; Sat, 07 Sep 2002 19:43:43 -0400 Original-To: Alex Schroeder Content-Disposition: inline In-Reply-To: <874rd1ki2s.fsf_-_@emacswiki.org> User-Agent: Mutt/1.3.28i Blat: Foop 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:7705 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7705 On Sat, Sep 07, 2002 at 04:08:59PM +0200, Alex Schroeder wrote: > Hm, but while we are in the same session, potential bug remain (the > ones that Per keeps talking about). > > 1. Load foo.el which uses defkeymap to create a keymap with binding A > for one key. > 2. Customize the keymap with binding B for the same key. The shadowed > binding A is saved. > 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. ... > We had a solution using two variables instead of one, which was > considered a drawback. In step 4, however, this two-variable solution > would have reverted to binding B. The above situation seems rather silly (and unlikely); if `foo-extra' screws around like that, then I don't think we should expect custom to intuit what the right thing to do is. If a hook overrode the binding, on the other hand, then I think restoring to A is the _right_ thing to do (the custom command is probably `restore to original setting'). > This is what Per calls the 100% solution. ... which is a misnomer, since it's not really `100%', just 90% with a different 10% cut out. -Miles -- P.S. All information contained in the above letter is false, for reasons of military security.