On Tue, Nov 11, 2008 at 1:04 AM, Josip Gracin <[EMAIL PROTECTED]> wrote: > > I've unsuccessfully tried something like: > `(binding [*ns* (find-ns 'target-ns)] > (defn fun [] ...))
The problem is that entire form is compiled with *ns* bound to its current value before evaluation begins. By the time you bind *ns* to your target-ns, it's too late -- the defn is already compiled to resolve to the old namespace. I can't think of any way to do this in a single macro expansion without using "eval" on the defn form, but maybe I'm missing something. --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---