From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bob Nelson Newsgroups: gmane.emacs.help Subject: Canonical add-hook idiom Date: Sat, 15 Nov 2003 05:35:34 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1068875450 4913 80.91.224.253 (15 Nov 2003 05:50:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2003 05:50:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 15 06:50:48 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 1AKtKZ-00023d-00 for ; Sat, 15 Nov 2003 06:50:48 +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 1AKuBX-0008Dd-6D for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Nov 2003 01:45:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!2b9f14ce!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: tin/1.5.12-20020427 ("Sugar") (UNIX) (Linux/2.4.22 (i686)) Original-Lines: 12 Original-NNTP-Posting-Host: 209.246.134.159 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread1.news.pas.earthlink.net 1068874534 209.246.134.159 (Fri, 14 Nov 2003 21:35:34 PST) Original-NNTP-Posting-Date: Fri, 14 Nov 2003 21:35:34 PST Original-Xref: shelby.stanford.edu gnu.emacs.help:118303 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:14244 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14244 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. -- ============================================================================= Bob Nelson -- Dallas, Texas, USA (nelsonbe@earthlink.net) http://www.oldradio.com/archives/nelson/open-computing.html Good engineering is finding the right wrench to pound in the correct screw