help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use "dolist" if it's elements are also list


From: Pascal J. Bourguignon
Subject: Re: how to use "dolist" if it's elements are also list
Date: Wed, 04 Nov 2009 05:56:02 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin)

Chris <bbshliu@gmail.com> writes:

> 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))

(setf my-common-key-binding (append my-common-key-binding
                                    c-mode-common-hook
                                    java-mode-hook
                                    perl-mode-hook
                                    php-mode-hook
                                    emacs-lisp-mode-hook))

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]