From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Henrik Enberg Newsgroups: gmane.emacs.help Subject: Re: Canonical add-hook idiom Date: Sat, 15 Nov 2003 19:27:43 +0100 Organization: Le Petomane Appreciation Society Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ptft7ahs.fsf@enberg.org> References: <87vfpm3uol.fsf@ID-87814.user.dfncis.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068923692 15106 80.91.224.253 (15 Nov 2003 19:14:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2003 19:14:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 15 20:14:47 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AL5sd-0001c0-00 for ; Sat, 15 Nov 2003 20:14:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AL6pm-0005QY-5u for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Nov 2003 15:15:54 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!h102n2fls32o1112.telia.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: h102n2fls32o1112.telia.com (213.65.65.102) Original-X-Trace: news.uni-berlin.de 1068923438 55160922 213.65.65.102 (16 [125297]) X-Now-Playing: James Brown - Public Enemy Number #1 (Part 1) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:7cDQKpsH8XRzrDqwOgj6GuIAQGU= Original-Xref: shelby.stanford.edu gnu.emacs.help:118335 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14276 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14276 Oliver Scholz writes: > Bob Nelson writes: > >> What is the preferred approach given these examples: >> >> 1). (add-hook 'some-mode-hook (lambda () [...] > > 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. In addition using #'(lambda () ...) or '(lambda () ...) means the lambda form won't be compiled if the file is.