help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Binding same command to two separte keys??


From: Matthew Flaschen
Subject: Re: Binding same command to two separte keys??
Date: Fri, 13 Apr 2007 18:23:29 -0400
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

David Hansen wrote:
> On Fri, 13 Apr 2007 17:04:40 -0400 Matthew Flaschen wrote:
> 
>> kbd is supposed to be an easy method to unify all the others, but
>> I think it's slightly (perhaps negligibly) slower.
> 
> In byte-compiled code it's not slower.  IMHO it's the most readable
> and therefore preferable way to write key bindings.

Maybe so, but he's not going to byte-compile .emacs .

> 
>>> So ... in (global-set-key (kbd "M-s") #'shell-command)
>> No, just
>> (global-set-key (kbd "M-s") 'shell-command)
> 
> #'symbol is the same as (function symbol).  It never harms to use it
> when passing functions as an argument and in some cases the compiler
> can use this hint for optimization.

Okay, thanks.

Matthew Flaschen




reply via email to

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