Did you know ... Search Documentation:
Predicate hook/1
 prolog:hook(Goal)[multifile, user_profile('home/swipl/src/swipl-devel/build/home/library/prolog_xref')]
True if Goal is a hook that is called spontaneously (e.g., from foreign code).
 prolog:hook(Goal)[multifile, library(prolog_xref)]
True if Goal is a hook that is called spontaneously (e.g., from foreign code).