
(setq auto-mode-alist
      (append '(
                ("\\.pl" . prolog-mode))
              auto-mode-alist))

(add-hook 'find-file-hook 'd-prolog-turn-on-font-lock)
(defun d-prolog-turn-on-font-lock ()
  (if (eq major-mode 'prolog-mode)
      (font-lock-mode 1)))

(add-hook 'font-lock-mode-hook 'd-prolog-fonts)
(defun d-prolog-fonts ()
  ;;(d-foo)
  (when (eq major-mode 'prolog-mode)
    (d-font-lock-add-end '(
                           (":-" 0 'fg:lightgreen t)
                           ("[][(),.!]" 0 'fg:lightgreen nil)
                           ("\\<[A-Z]\\sw*\\>" 0 'fg:yellow nil)))
    )
  )

(provide 'd-prolog)
;;; d-prolog.el ends here
