Did you know ... Search Documentation:
Using SWI-Prolog with GNU-Emacs

With sweep, SWI-Prolog has an excellent mode for GNU-Emacs provided by Eshel Yaron. Sweep embeds SWI-Prolog in Emacs, providing functionality that is similar to that of the builtin PceEmacs