Emacs prolog-mode

Thierry.Martinez@inria.fr

A prolog mode for Emacs, modified from Sicstus Prolog, itself modified from the Emacs original prolog mode.

Installation

Add the following lines to your .emacs, replacing <installation path> by the directory where the archive has been extracted.

; - Prolog
(load "<installation path>/prolog-mode/prolog.el")

This will autoload and use the prolog-mode when a file with the extension .pl or .pro or .chr is loaded. For .pl, it will do this except if the file begins with a perl shebang line. It will use Sicstus as default back-end except for .chr for which SWI Prolog is preferred.

Usage

To use GNU Prolog as default back-end:

(add-hook 'prolog-mode-hook
          (lambda ()
            (set-prolog-system 'gprolog)))

The back-end may be changed by clicking on the back-end related button on the mode line or with M-x set-prolog-system.

The current buffer is saved and consulted with C-c C-f. If it is the first time you consult this buffer for the selected back-end, you are requested for a Prolog session name: by default, the name of the back-end is used as session name. You can change the session afterward by clicking on the dedicated button on the mode line or with M-x set-prolog-session.

Download

Download prolog-mode.tar.gz.