From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kalle Olavi Niemitalo Newsgroups: gmane.emacs.help Subject: Re: elisp macros problem Date: Sun, 25 Jul 2004 13:59:31 +0300 Organization: Oulun Puhelin Oyj - Baana Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87fz7g4ajw.fsf@Astalo.kon.iki.fi> References: <4102DDEE.9080906@cs.ubc.ca> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090753935 18289 80.91.224.253 (25 Jul 2004 11:12:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Jul 2004 11:12:15 +0000 (UTC) Keywords: add-hook Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 25 13:12:09 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BogvJ-0006ux-00 for ; Sun, 25 Jul 2004 13:12:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BogyI-00049x-4J for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jul 2004 07:15:14 -0400 Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 17 Original-NNTP-Posting-Host: addr-213-216-220-146.suomi.net Original-X-Trace: plaza.suomi.net 1090753563 28089 213.216.220.146 (25 Jul 2004 11:06:03 GMT) Original-X-Complaints-To: abuse@mail.suomi.net Original-NNTP-Posting-Date: Sun, 25 Jul 2004 11:06:03 +0000 (UTC) X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 In-Reply-To: (Lowell Kirsh's message of "Sat, 24 Jul 2004 18:58:30 -0700") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:St5Jr2CNXblYAHoBzJkY8YIzQT8= Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!feed.news.tiscali.de!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.bahnhof.se!feeder1.news.jippii.net!news.cc.tut.fi!news.dnainternet.net!news.kv9.net!news.kv9.net!news.suomi.net!Astalo.kon.iki.fi!news Original-Xref: shelby.stanford.edu gnu.emacs.help:124442 comp.lang.lisp:144167 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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:19778 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19778 Lowell Kirsh writes: > the reason that i didn't realize it was working was that i > thought you could (add-hook 'some-mode ...) more than once, but > really, this will just overwrite the previously added hook. No, it won't. (setq sample-hook '()) (add-hook 'sample-hook 'sample-1) (add-hook 'sample-hook 'sample-2) (add-hook 'sample-hook 'sample-2) After these forms, the value of sample-hook is (sample-2 sample-1). The second add-hook did not overwrite the first one. However, the third one had no effect, because sample-2 was already in the hook.