From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Chris <bbshliu@gmail.com>
Newsgroups: gmane.emacs.help
Subject: how to use "dolist" if it's elements are also list
Date: Wed, 04 Nov 2009 12:31:12 +0800
Message-ID: <4AF10390.1060102@gmail.com>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: ger.gmane.org 1257309114 17967 80.91.229.12 (4 Nov 2009 04:31:54 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 4 Nov 2009 04:31:54 +0000 (UTC)
To: help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 04 05:31:46 2009
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([199.232.76.165])
	by lo.gmane.org with esmtp (Exim 4.50)
	id 1N5XX8-0003xp-Iz
	for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Nov 2009 05:31:46 +0100
Original-Received: from localhost ([127.0.0.1]:40704 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1N5XX7-0006Qc-SS
	for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Nov 2009 23:31:45 -0500
Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5XWk-0006PP-Ur
	for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 23:31:22 -0500
Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5XWf-0006LL-H8
	for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 23:31:21 -0500
Original-Received: from [199.232.76.173] (port=36726 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5XWf-0006L3-BZ
	for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 23:31:17 -0500
Original-Received: from mail-gx0-f224.google.com ([209.85.217.224]:40369)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <bbshliu@gmail.com>) id 1N5XWf-0004aO-3U
	for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 23:31:17 -0500
Original-Received: by gxk24 with SMTP id 24so3785017gxk.6
	for <help-gnu-emacs@gnu.org>; Tue, 03 Nov 2009 20:31:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:subject:content-type
	:content-transfer-encoding;
	bh=5u8gMDvdZl/XaRW49qzW3DXIlLMjBgG8PvBRMPdBlGQ=;
	b=bSPTVK8zD9JMwwmvYrjIlVpEqK4SFvXXVtBLhdWxggM6vsU/pTC1ODJsAx/UTBEzld
	aZnCPSRG7GbBg1uLU78Pg6hlqOA3yyOYg57dJufns62L1GeFWD82qD315DbztwALtSvU
	NetfvJoWhfpt2nvmKZ6uOOwdb5rRPzBXJ9YfI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	b=re04DXI4ZNcfgwXc3tGkLXdxIq7NmP73M5EMH9EgDECHJrwqPhTJbuFZ/nmCY93slH
	srDxB7m4cKbwnH/cVTLBrVpav6e/y4DZk60kiq0GUPpytDxemgmCzPNHxiSx/P2gShOc
	p4zwdmeMa7jp0LZy2RwJnnOVTECs/d7X39X3k=
Original-Received: by 10.90.23.21 with SMTP id 21mr2548622agw.59.1257309075936;
	Tue, 03 Nov 2009 20:31:15 -0800 (PST)
Original-Received: from ?219.216.101.104? ([219.216.101.104])
	by mx.google.com with ESMTPS id 6sm349142yxg.30.2009.11.03.20.31.13
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 03 Nov 2009 20:31:14 -0800 (PST)
User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
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 <help-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.help:69460
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/69460>

Hello the group.

I want to add a function to several hooks using dolist, but it doesn't 
work as I thought. I know the reason is that the hook in the list is not 
recgonized as a list, but I don't know how to fix it. Any help?

(dolist
    (the-hook
     '(c-mode-common-hook
       java-mode-hook
       perl-mode-hook
       php-mode-hook
       emacs-lisp-mode-hook))
  (add-hook 'the-hook 'my-common-key-binding))