Open kindlychung opened 9 years ago
Why not just use hooks instead of #'hooks? It's likely that the hooks function will change dynamically.
hooks
#'hooks
(defmacro with-hooks-disabled [f & body] `(do (when-not (#'hooks (var ~f)) (throw (Exception. (str "No hooks on " ~f)))) (with-redefs [~f (#'original (var ~f))] ~@body)))
Why not just use
hooks
instead of#'hooks
? It's likely that thehooks
function will change dynamically.