Encapsulate macro name extraction in ad hoc method.