From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Command remapping and the delete-frame problem. Date: Fri, 22 Feb 2002 11:24:14 -0500 Message-ID: <200202221624.g1MGOEH30395@rum.cs.yale.edu> References: <5x3czwjqxs.fsf@kfs2.cua.dk> <7263-Wed20Feb2002194728+0200-eliz@is.elta.co.il> <5xd6yzwxs8.fsf@kfs2.cua.dk> <200202220433.g1M4XP414080@aztec.santafe.edu> <5xd6yx965v.fsf_-_@kfs2.cua.dk> <5xpu2xv81x.fsf@kfs2.cua.dk> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1014395332 5087 195.204.10.66 (22 Feb 2002 16:28:52 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 22 Feb 2002 16:28:52 GMT Cc: rms@gnu.org, emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16eIZ1-0001Jx-00 for ; Fri, 22 Feb 2002 17:28:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eIXR-0007jj-00; Fri, 22 Feb 2002 11:27:13 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eIUa-0007Uk-00; Fri, 22 Feb 2002 11:24:16 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g1MGOEH30395; Fri, 22 Feb 2002 11:24:14 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1428 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1428 > Earlier today, I wrote: > > > > Are you now saying that remapping should have been implemented > > using a specific `command' prefix like this: > > > > (define-key map [command command1] 'command2) > > > > I can see that this is better than the current implementation as it > > makes a clear destinction (in the keymaps) between commands and other > > symbols like those used on the menu-bar, and a few symbols which are > > both commands and keys (e.g. `undo'). > > > > All of this makes a lot of sense -- should I go back and change the > > implementation to use an explicit `command' prefix for command > > remapping? > > Actually, I went ahead an made the changes in a fully transparent way. > This means that internally, remapping command FOO to BAR is stored as > a binding for [command FOO], i.e. the "event" `command' is bound to a > keymap in which FOO is mapped to BAR. Good. The delete-frame bug was that C-x 5 0 was bount to the command `delete-frame' and that there is a `delete-frame' event which is bound to `handle-delete-frame', so with the remapping C-x 5 0 found itself suddenly remapped to `handle-delete-frame' (which burped because it didn't expect to be bound to a key sequence). > But the interface to define-key, lookup-key and key-binding hasn't > changed. They just take FOO as the KEY argument - which is still an > unambuguous way to represent command remapping, as those functions > don't otherwise accept a symbol as the KEY argument. That now sounds like a hack and I don't think it's worth keeping it. Especially since it's not compatible with the XEmacs hack where a non-vector argument passed to one of those functions is interpreted the same as a length-1 vector so you can (define-key 'button1 'command) instead of (define-key [button1] 'command) which is itself a shorthand for (define-key [(button1)] 'command) -- Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel