Edit: Simplified docutils, sphinx hooks (no need for hook() function)

Per an e-mail exchange, here's a slightly simplified version of two hooks.