Running Prolog
| Using Prolog |   |
Add
Before editing your PATH line might look like this:
After editing this:
|
|---|---|---|
| Emacs Interface |   |
Try inserting the following in a file called .emacs in your home directory:
;;;;; P R O L O G
;
; Where prolog is!!!
(setq load-path
(cons (expand-file-name "/opt/sicstus/lib/sicstus-3.12.5/emacs")
load-path))
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
(setq prolog-use-sicstus-sd t)
;;; Define Prolog file extension for prolog mode
(setq auto-mode-alist (cons '("\\.pl$" . prolog-mode) auto-mode-alist))
;;; Now get one for Perl, because you just took the default away.
(setq auto-mode-alist (cons '("\\.prl$" . perl-mode) auto-mode-alist))
;; Add prolog docs to default info
(setq Info-default-directory-list
(append Info-default-directory-list '("/opt/sicstus/lib/sicstus-3.12.5/doc/info")))
You can execute the command
Prolog will start up under emacs. Esc-P allows to re-execute the previous Prolog goals. Keep typing Esc-P over and over to see commands further and further back in your command history. Be sure to see: |