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