Is it possible to have a qualified keyword inside a macro resolve in the caller's namespace? For example:
(ns a)
(defmacro m [] `(do ::k))
And in another namespace:
(ns b)
(use 'a)
(m)
In this example, (m)
resolves to :a/k
(the namespace where the macro is defined). I am wondering if there is a way to get it to resolve to :b/k
(the namespace where the macro is called).
(defmacro m [] (keyword (name (ns-name *ns*)) "k"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With