Reputation: 625
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).
Upvotes: 6
Views: 441