correctly esc in macros