backport from paradise/macros

review @paulp @retronym