assuming you have put the 'prolog.el' file in ~/emacs_modes, add the following to your .emacs file (in your home directory) ;; adding load path to files (setq load-path (cons "~/emacs_modes" load-path)) ;; PROLOG (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) (setq auto-mode-alist (cons '("\\.pl" . prolog-mode) auto-mode-alist))