technomancy / robert-hooke

Hooke your Clojure functions!
Other
358 stars 27 forks source link

Added ability to associate hooks with keys #7

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hi, First commit adds support for named hooks, so one can write (add-hook #'f :foo (fn [f x] ...)). Second one fixes test-clear-hooks test case, which was failing for me because metadata on function contained some clojure's keys. In the third I've removed stuff with skipped test, because it was throwing an exception and honestly I don't get how it's supposed to work. 4th commit updates clojure to 1.4 and replaces binding with with-redefs. Finally, the last one contains misc refactorings. Could you please review this changes and, if they are ok, release a new version?

technomancy commented 12 years ago

This looks great; I like the way you use a map to make add-unless-present unnecessary. Definitely cleaner. I've pushed out a 1.2.0 release.

ghost commented 12 years ago

Great, thanks!