On Fri, Jul 10, 2009 at 3:44 PM, Rowdy Rednose <rowdy.redn...@gmx.net>wrote:

>
> On Jul 10, 10:28 pm, Stuart Halloway <stuart.hallo...@gmail.com>
> wrote:

> You can rebind macros, but in order to use them you have to compile
> > some code again.
>
> Recompiling would be fine in this case, but how can I rebind macros?


eval is evil but...

(let [old-dosync-fn @#'dosync]
  (binding [dosync (fn [& body]
                     `(do
                        (assert (javax.swing.SwingUtilites/
isEventDispatchThread))
                        ~@(apply old-dosync-fn body)))]
    (eval '(code to be compiled with your dosync))))


-- 
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)

--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to