Permalink
Browse files

Merge pull request #11 from hugoduncan/document-scopes

Document hook-scope in README
  • Loading branch information...
technomancy committed Oct 10, 2012
2 parents e0d1148 + 9049ac0 commit 76eabb53c3d2bc165706073633b166603e81a9c9
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 76eabb5

Please sign in to comment.