Add this lines to the file .emacs in your home directory: (modify it
to suit your need, you may especially need to change the auto-mode-alist
and the load-path)
;; make sure emacs can find prolog.el when it goes looking...
(setq load-path (cons "/Path_to_your_home_directory/.eprolog" load-path))
;; tell emacs where to find xsb-mode and prolog-mode
(autoload 'xsb-mode "prolog" "Major mode for editing XSB programs." t)
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
;; uncomment one of these to select your prolog of the month.
(setq prolog-program-name "xsb")
;; (setq prolog-program-name "sicstus")
;; tell emacs to enter xsb-mode for a file ending in .P or .H and to
;; enter prolog-mode for a file ending in .pl
(setq auto-mode-alist (mapcar 'purecopy
'(("\\.c$" . c-mode)
("\\.h$" . c++-mode)
("\\.cc$" . c++-mode)
("\\.C$" . c++-mode)
("Makefile" . makefile-mode)
("\\.el$" . emacs-lisp-mode)
("\\.emacs$" . emacs-lisp-mode)
("\\.a$" . c-mode)
("\\.html$" . html-mode)
("\\.htm$" . html-mode)
("\\.tex$" . latex-mode)
("\\.bib$" . bibtex-mode)
("\\.p$" . prolog-mode)
("\\.P$" . prolog-mode)
("\\.pl$" . perl-mode)
("\\.lsp$" . lisp-mode))))