emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command remapping and the delete-frame problem.


From: Stefan Monnier
Subject: Re: Command remapping and the delete-frame problem.
Date: Fri, 22 Feb 2002 14:38:37 -0500

> "Stefan Monnier" <monnier+gnu/address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]