Permalink
Browse files

Document hook-scope in README

  • Loading branch information...
1 parent e0d1148 commit 9049ac0abe9ba611ec37f2fe91986f4e1f711895 @hugoduncan hugoduncan committed Oct 6, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 README.md
View
@@ -108,6 +108,22 @@ stripped out:
(print-name "Alan Moore"))
> Alan Moore
+The `hook-scope` macro provides a scope which records any change to hooks during
+the dynamic scope of its body, and restores hooks to their original state on
+exit of the scope. Note that all threads share the scope. Using the example
+functions above:
+
+ (examine "something")
+ > something
+
+ (hook-scope
+ (add-hook #'examine #'microscope)
+ (examine "something"))
+ > SOMETHING
+
+ (examine "something")
+ > something
+
## License
Copyright © 2010-2011 Phil Hagelberg and Kevin Downey

0 comments on commit 9049ac0

Please sign in to comment.