Fix invalid function error

Macros must be defined before the first use.

Otherwise the byte compiler fails to expand the macro during compilation. 
Depending on the Emacs version this either degrades performance, because the
macro is expanded and interpreted dynamically on each invocation, or even
results an invalid function call, because the byte compiler compiles to a
standard function call, though it should have done macro expansion.