From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Newsgroups: gmane.emacs.help Subject: Re: how to use "dolist" if it's elements are also list Date: Wed, 04 Nov 2009 13:54:56 +0800 Message-ID: <4AF11730.3030702@gmail.com> References: <4AF10390.1060102@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------090908090300090007060405" X-Trace: ger.gmane.org 1257314145 27941 80.91.229.12 (4 Nov 2009 05:55:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Nov 2009 05:55:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 04 06:55:38 2009 Return-path: 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 1N5YqG-00050A-I9 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Nov 2009 06:55:36 +0100 Original-Received: from localhost ([127.0.0.1]:56441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5YqF-0001p3-V7 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Nov 2009 00:55:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5Ypn-0001ou-C3 for help-gnu-emacs@gnu.org; Wed, 04 Nov 2009 00:55:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5Ypi-0001oK-Nz for help-gnu-emacs@gnu.org; Wed, 04 Nov 2009 00:55:06 -0500 Original-Received: from [199.232.76.173] (port=57452 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5Ypi-0001oH-IS for help-gnu-emacs@gnu.org; Wed, 04 Nov 2009 00:55:02 -0500 Original-Received: from mail-yw0-f194.google.com ([209.85.211.194]:47617) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5Ypi-0007jX-3L for help-gnu-emacs@gnu.org; Wed, 04 Nov 2009 00:55:02 -0500 Original-Received: by ywh32 with SMTP id 32so6501687ywh.14 for ; Tue, 03 Nov 2009 21:55:00 -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:cc:subject:references:in-reply-to :content-type; bh=Mi9biX+i7OlWNj1qGhJXt9dFGe064zBHoooZP/SctlA=; b=tU1O/WwKrK0kpJHcUpHMCQrw+cRXyOX9UpvYLjz3mw3EBFmlsnB+u2cd1eoRMlm/j2 eN4Yxz8TjEQbshtUD15oeTjPXCeLrLitSUvtdoKOwTxnzB8hNdD6Jg323AWdNH9vbXbk oOm4Od1TQ4myd8fVt/SGjgy37CyyaOETb3wK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=GRMssjRiiBKENtKM4fB6p2bK+XNC7ioPtGpbOipfVn1hV9tLozmem1c2BRtT43aR9i 8UFJRe2pmi1TsRuitU3ITzC1ufKzeyzemPoSxwNnOTF4JmwC9abFrxg8boVhm3Zw6Jee NS03/IhwmW0A40aKqoB6iraqPKHsRgUJaeMwE= Original-Received: by 10.91.160.29 with SMTP id m29mr2727891ago.67.1257314100824; Tue, 03 Nov 2009 21:55:00 -0800 (PST) Original-Received: from ?219.216.101.104? ([219.216.101.104]) by mx.google.com with ESMTPS id 8sm377045yxg.24.2009.11.03.21.54.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 21:54:59 -0800 (PST) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:69463 Archived-At: This is a multi-part message in MIME format. --------------090908090300090007060405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Drew Adams wrote: >> (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)) >> > > > Don't quote the-hook. You want its value. The value of 'the-hook is the symbol > the-hook itself, not the value of that symbol. > > thanks for your help. it now works. --------------090908090300090007060405 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Drew Adams wrote:
(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))
    


Don't quote the-hook. You want its value. The value of 'the-hook is the symbol
the-hook itself, not the value of that symbol.

  
thanks for your help. it now works.
--------------090908090300090007060405--