Unfortunately the default Prolog mode of GNUÂ Emacs is not very good. There are several alternatives though: