Re: Macro Help: 1 macro => many sexp
- From: Pillsy <pillsbury@xxxxxxxxx>
- Date: 30 May 2007 02:34:13 -0700
On May 30, 12:02 am, Edward Dodge <nos...@xxxxxxxxxxx> wrote:
[...]
As a Lisp newbie, I'm used to dealing with aggregate items as strings
or as lists, but enclosingfunction will obviously not like it if I
pass it this:
(enclosingfuncion '((expandedmacro1) (expandedmacro2)...
Assuming I have built the list of macro expansions, how do I tell Lisp
to remove the outer '() and splice the results into enclosingfunction?
I don't know how to tell Lisp how to do exactly that. However, I do
know how to tell Lisp how to do something very similar, which is to
have enclosingfunction treat the list '((expandedmacro1) ... ) as if
it were its list of parameters. You do this using the APPLY function:
(apply #'enclosingfunction '((expandedmacro1) ...))
is equivalent to
(enclosingfunction (expandedmacro1) ...)
and should do exactly what you want.
Cheers,
Pillsy
.
- References:
- Macro Help: 1 macro => many sexp
- From: Edward Dodge
- Macro Help: 1 macro => many sexp
- Prev by Date: Re: n accuracy
- Next by Date: Re: issue with operator precedence in Parenscript
- Previous by thread: Re: Macro Help: 1 macro => many sexp
- Next by thread: n accuracy
- Index(es):
Relevant Pages
|