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: David Hansen
Subject: Re: Binding same command to two separte keys??
Date: Fri, 13 Apr 2007 23:55:12 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.97 (gnu/linux)

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.

>> 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.

David





reply via email to

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