Tips for writing macros in SWI Prolog. This should eventually be expanded into a full blog post:
For each module that defines a macro, define a predicate like:
wants_my_fancy_macro :-
prolog_load_context(module, Module),
Module \== my_module, % don't expand macros in our own code