Re: Need help for the macro with defn and defmacro inside

2010-03-04 Thread sailormoo...@gmail.com
Oh, thanks Meikel, I don't have a strong knowledge of how those symbol, gensym and symbolic quote and unquote work? It's like a puzzle, but I think I know a bit more with your help . -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

Re: Need help for the macro with defn and defmacro inside

2010-03-04 Thread Meikel Brandmeyer
Hi, I think you have some misunderstandings here how things work. * the # notation works only *inside* a syntax-quote. * you have to create locals with # notation. * var is a special form which looks up the Var named by the given Symbol. (defmacro create-database-methods [table] (let [kw-tab

Need help for the macro with defn and defmacro inside

2010-03-03 Thread sailormoo...@gmail.com
Hi : I would try to make a macro to simplify the database methods as follows, but it doesn't work, is there any way to fix it, or any easier solution? Thanks.. (defmacro with-db [& body] `(with-connection *db* ~...@body)) (defmacro with-transaction [& body] `(with-db (transaction ~...@body