On Tue, Dec 16, 2008 at 6:21 PM, Randall R Schulz <rsch...@sonic.net> wrote: > > On Tuesday 16 December 2008 15:05, Allen Rohner wrote: >> > On Dec 16, 4:32 pm, Stuart Halloway wrote: >> > > Hi all, >> > > >> > > I sometimes need to (re)load a library, removing public symbols >> > > from previously loaded version of the same lib: >> > > >> > > (defmacro ns-reload >> > > `(do >> > > (if (find-ns '~ns) >> > > (doseq [s# (keys (ns-publics '~ns))] (ns-unmap '~ns s#))) >> > > (require :reload-all '~ns)))
This has come up before: http://clojure-log.n01se.net/date/2008-11-04.html#13:59 Do you want to remove only the public vars, or all of them? (defn ns-unmap-all [nspc] (doseq [[n v] (ns-interns nspc)] (ns-unmap nspc n))) --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 clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---