Use macro for hook definitions.