Modes are the heart of (Pce)Emacs. Modes define dedicated editing support for a particular kind of (source) text. For our purpose we want Prolog mode. There are various ways to make PceEmacs use Prolog mode for a file.
.plor the selected alternative (e.g.
.pro) extension, Prolog mode is selected.
#!/path/to/swiploptions, Prolog mode is selected regardless of the extension.
-*- Prolog -*-