The Prolog mode that comes with Emacs is not that good. A much better one is available though, at http://turing.ubishops.ca/home/bruda/emacs-prolog
The mode plays nicely with, between others, SWI Prolog, and features syntax highlighting, auto indent, predicate menu, and full interaction with an inferior Prolog process. It is probably not as powerful as PceEmacs (though this is in my opinion open to discusion) but then I use Emacs night and day so I prefer it to PceEmacs.
At the time of writing the version is 0.1.41, which is attached to this page. However, I will not update the attachement very often, so do go to the Web page mentioned above for the most current version. As well, the guide below is a bit outdated--so it is useful, but do take a look at the mode's official page too.
prolog.elfrom http://turing.ubishops.ca/home/bruda/emacs-prolog and save it to the
site-lispsub-directory of Emacs, e.g.,
prolog.elinto Emacs and select Emacs-Lisp->Byte-compile this file.
(setq auto-mode-alist (cons (cons "\\.pl" 'prolog-mode) auto-mode-alist))
Where is ~/_emacs?
~ is a shortcut for the home directory, on Windows it is system
and language specific. It may be for example
C:\Dokumente. The best way to find "~" is: select
"Files->Open.." and enter "~". Then Emacs prints the directory
name and contents.
(((getenv "EPROLOG") (eval (getenv "EPROLOG"))) (eclipse "eclipse") (mercury nil) (sicstus "sicstus") (swi "c:/Programme/swipl/bin/swipl.exe") (t "prolog"))
and "Save for future sessions".