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

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

Re: Canonical add-hook idiom


From: Oliver Scholz
Subject: Re: Canonical add-hook idiom
Date: Sat, 15 Nov 2003 09:25:14 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Bob Nelson <address@hidden> writes:

> What is the preferred approach given these examples:
>
>     1). (add-hook 'some-mode-hook (lambda () [...]
>     2). (add-hook 'some-mode-hook '(lambda () [...]
>     3). (add-hook 'some-mode-hook (function (lambda () [...]
>     4). None of the above -- please explain.
[...]

I definitely prefer (1).

Some would prefer #'(lambda () ...), which for the Lisp interpreter
is the same as (3).  But AFAIK this is just a Common Lisp idiom and
it makes no difference in Emacs Lisp.

    Oliver
-- 
25 Brumaire an 212 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

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