[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp macros problem
From: |
David Kastrup |
Subject: |
Re: elisp macros problem |
Date: |
26 Jul 2004 07:55:21 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
> Why does this not work:
>
> (defmacro my-add-hooks (hooks &rest body)
> `(dolist (hook ,hooks)
> (my-add-hook hook ,@body)))
>
> ??
Because you need to write
`(dolist (hook ',hooks)
and then call this with an _unquoted_ list, like
(my-add-hooks (lisp emacs-lisp)
body)
Apart from that, I consider this sort of thing a crock. What are you
hoping to achieve that you would not be better off doing by a proper
function instead of a macro?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Re: elisp macros problem, Barry Margolin, 2004/07/25
Re: elisp macros problem, Oliver Scholz, 2004/07/26
Re: elisp macros problem,
David Kastrup <=
- Re: elisp macros problem, Lowell Kirsh, 2004/07/27
- Re: elisp macros problem, Lowell Kirsh, 2004/07/27
- Re: elisp macros problem, David Kastrup, 2004/07/27
- Re: elisp macros problem, Lowell Kirsh, 2004/07/27
- Re: elisp macros problem, Pascal Bourguignon, 2004/07/27
- Re: elisp macros problem, Rob Warnock, 2004/07/28
Re: elisp macros problem, Barry Fishman, 2004/07/27