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

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

Re: elisp macros problem


From: Barry Margolin
Subject: Re: elisp macros problem
Date: Sun, 25 Jul 2004 22:03:54 -0400
User-agent: MT-NewsWatcher/3.4 (PPC Mac OS X)

In article <ce1n4n$2gt$1@mughi.cs.ubc.ca>,
 Lowell Kirsh <lkirsh@cs.ubc.ca> wrote:

> Why does this not work:
> 
> (defmacro my-add-hooks (hooks &rest body)
>    `(dolist (hook ,hooks)
>        (my-add-hook hook ,@body)))
> 
> ??

It looks like it should work to me.  Make sure you quote the list of 
hooks when calling it, e.g.

(my-add-hooks '(emacs-lisp lisp) (local-set-key ...))

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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