As some of you know I am implementing Shen in Clojure. Since Shen has a dual namespace and all symbols evaluate to themselves I need a Clojure macro, which binds the symbol to itself and the value to a postfixed symbol.
Now also symbols like *language*
have to be bound. But when I use the following macro with *language*
as a parameter I get Warning: *language* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *language* or change the name.
(defmacro set [x y]
`(let [y# ~y]
(def ^:dynamic ~x '~x)
(intern *ns* (symbol (str (name ~x) "__varPoF__")))
(def ^:dynamic ~(symbol (str (name x) "__varPoF__")) y#)
y#))
Can someone tell me why this is not working?