Setting Prolog flag "double_quotes" temporarily to "codes" causes help/1 to become confused

You cannot go back as the hep code was already compiled with the wrong flag setting. You will get no error if you do instead:

?- help(current_prolog_flag).
true.

?- set_prolog_flag(double_quotes,codes).
true.

?- help(current_prolog_flag).
true.

In SWI-Prolog, the double_quotes flag is local to a module and thus it’s possible that this issue is just a missing set_prolog_flag/2 directive in one of the help modules.

3 Likes