I would like to know how get a macro to be expanded/evaluated within another macro when passed in as an argument.
e.g. if i define the macro:
(defmacro cond-clause (expr res)
`(,expr (push ,res res)))
Then (macroexpand-1 '(cond-clause (= c 8) 1))
returns ((= C 8) (PUSH 1 RES))
if i define another macro
(defmacro test (expr)
`(cond ,(',expr)))
and call (macroexpand-1 '(test (cond-clause (= c 8) 1))) it returns
(COND (COND-CLAUSE (= C 8) 1))
it seems like the macro i pass in as argument isn't being expanded in the test macro call
what i want the test macro to return is (COND ((= C 8) (PUSH 1 RES)))
is there away to do this? Help is greatly appreciated.
