How to write (simple) macro?

Posted by krzysz00 on Stack Overflow See other posts from Stack Overflow or by krzysz00
Published on 2010-05-23T16:41:15Z Indexed on 2010/05/23 16:51 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

I need to write a macro (with-hooks (monster method who what) &body body) for a game I'm writing. Monster is a CLOS object, method and who are strings and what is a function (#' notation). The macroexpansion would be something to the effect of

(add-hook monster method who what)
,@body
(remove-hook monster method who)

I have absolutely no idea how to write such a macro, and I would appreciate some help.

© Stack Overflow or respective owner

Related posts about macros

Related posts about lisp