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 14:38:37 -0500 Message-ID: <200202221938.g1MJcbn31112@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> <200202221624.g1MGOEH30395@rum.cs.yale.edu> <5x3cztjotz.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 1014406889 13587 195.204.10.66 (22 Feb 2002 19:41:29 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 22 Feb 2002 19:41:29 GMT Cc: "Stefan Monnier" , 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 16eLZQ-0003X3-00 for ; Fri, 22 Feb 2002 20:41:28 +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 16eLXm-0000Dt-00; Fri, 22 Feb 2002 14:39:46 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eLWk-00009F-00; Fri, 22 Feb 2002 14:38:42 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g1MJcbn31112; Fri, 22 Feb 2002 14:38:37 -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:1439 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1439 > "Stefan Monnier" writes: > > > > 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) > > The main reason for allowing the symbol name in the first place was > that it is marginally more efficient in command_loop_1 to call > Fkey_binding and thus Flookup_key with a symbol name (the command > found by read_key_sequence), rather than building a 2-element vector > [command CMD] and using that to call Fkey_binding. As RMS suggested, we can pre-build a 2-element vector and always use that same one, so the loop still doesn't need to allocate. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel