;; -*-emacs-lisp-*-
;; $Id: prolog.gel,v 1.12 1994/08/19 00:40:46 nickson Exp nickson $

(require 'genind)

(setq genind-previous-list
      '( ("%" . (+ 0))
         ("\\*/$" . (+ 0))
         ("\\.$" . 0)
         ("^($" . (+ 4))
         ("($" . (+ 4))
         ((& ":-$" ?\)) . (match redo 4))
         ((& "=$" ?\)) . (match redo 4))
         ((& "->$" ?\)) . (match redo 4))
         (":-$" . (+ 4))
         ("=$" . (+ 4))
         ("->$" . (+ 4))
         ("-->$" . (past 1))
         ((& "^(" ?\() . (+ 2))
         (?\( . (open 1))
         (?\) . (match redo 0))
         (?\[ . (open 1))
         (?\] . (match redo 0))
         (?{  . (open 1))
         (?}  . (match redo 0))
         ("^[:?]-" . 3)
         ("^;.*,$" . (+ 2))
         ("^\\+\\+.*,$" . (+ 3))
         (",$" . (+ 0))
         (" and$" . (+ 0))
         ("or$" . (+ 0))
         ("|$" . (open 4))
         ("^;" . (+ 4))
         ("^\\+\\+" . (+ 4))
         ("^function.*=$" . (+ 4))
         ("^where$" . (+ 4))
         ("^.* command$"     . (+ 2))
         ("^doc$"            . (+ 2))
         ("^header$"         . (+ 2))
         ("^extends$"        . (+ 2))
         ("^mode$"           . (+ 2))
         ("^wrapper$"        . (+ 2))
         ("^subwrappers$"    . (+ 2))
         ("^implementation$" . (+ 2))
))

(setq genind-current-list
      '( ("^;" . (open 0))
         ("^\\+\\+" . (open 0))
         ("^))" . (open -1))
         ("^)" . (open 0))
         ("^]" . (open 0))
         ("^}" . (open 0))
         ("^|" . (open 2))
         ("^where" . (+ 0))
))

(setq genind-indent-triggers
     '( ?\( ?\) ?\; ))

(genind-bindings)

;; TO DO:
;; Look into this problem:
;; write_proof_conjecture(I, N, T, (F, H), U) :-
;;     writelist([I, 'cj(', N, ',', T, ',']), 
;;               write_proof(I, F, H, U),
;;               write('),').
;; (the quoted lparen in line 2 causes the trouble; changing ' to " makes it
;; worse).
;; [MU 19 Aug '94]
