Thanks for your tips, Ken and Meikel.
Both of them were helpful, and helped me resolve my problem. First I tried:
user=> (defmacro my-with-cl [spec] `(with-command-line args "desc" ~spec
(prn foo)))
This almost works:
user=> (macroexpand-1 '(my-with-cl [[foo "something about foo" nil]
remainin
Hi,
Am Sonntag, 26. Juni 2011 17:22:14 UTC+2 schrieb mlimotte:
user> (my-with-cl '[[foo "something about foo" nil]])
> ; Evaluation aborted.
> Exception: Unsupported binding form: something about foo
>
Leave out the ' in front of the vector. with-command-line quotes it for you.
Adding the quote
On Sun, Jun 26, 2011 at 11:22 AM, Marc Limotte wrote:
> And (macroexpand (my-with-cl ...)) throws the same exception.
Macroexpand's a normal function, not a macro, so you need to quote its argument.
--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is
Hi.
I'm trying to understand why the following macro doesn't work. This is a
trivial example, but ultimately I want to create a macro that will let me
dynamically create the cmdspec for
clojure.contrib.command-line/with-command-line. I haven't written many
macros, so my general understanding may