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

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

Re: Syntax question for experts


From: Thierry Volpiatto
Subject: Re: Syntax question for experts
Date: Fri, 23 May 2008 10:34:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Sébastien Vauban <zthjwsqqafhv@spammotel.com> writes:

> Hi,
>
> A quick question...
>
> I've seen both
>
> (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?
Without, read that:
http://www.emacswiki.org/cgi-bin/wiki/QuotedLambda

> By "best", I mean more portable (XEmacs, etc.), or with a longer
> life-time (won't become erroneous in a couple of years), etc.
>
> Best regards,
>   Seb

If you want to quote the lambda , quote it like:

,----
| #'(lambda ()...)
`----


that is the same as

,----
| (function (lambda ()...))
`----

 
-- 
A + Thierry
Pub key: http://pgp.mit.edu




reply via email to

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