[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax question for experts
From: |
David Hansen |
Subject: |
Re: Syntax question for experts |
Date: |
Fri, 23 May 2008 10:37:51 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Fri, 23 May 2008 08:48:25 +0200 Sébastien Vauban wrote:
> (add-hook 'shell-mode-hook
> (lambda ()
> (whatever)))
>
> and
>
> (add-hook 'shell-mode-hook
> '(lambda ()
> (whatever)))
>
> (see the quote in front of lambda).
>
> What is the best writing? With or without the quote?
First one is better if you byte compile the code (the quoted expression
isn't byte compiled). Note that `lambda' is actually a macro that
expands to (function (lambda ...)).
Longer answer here:
http://www.emacswiki.org/cgi-bin/wiki/QuotedLambda
David