   (let (sofar)
     (cond ((setq sofar (prolog-completion-sofar))
 	   (send-prolog (concat
-			 "'$silent'(qp_complete_atom(\""
+			 "'$silent'(emacs_complete_atom(\""
 			 sofar
 			 "\"))")))
 	  (t

  (end-of-buffer)
  (setq *prolog-completion-process-mark*
	(marker-position (process-mark (get-buffer-process "*prolog*"))))
  (send-prolog "'$silent'(qp_next_command)"))


(defun prolog-insert-history-command (cmd)

;;; E-mail: jan@swi.psy.uva.nl

;;; This package forms a layer around the Quintus-Prolog interface.  It
;;; should be used together with the Prolog library 'emacs_interface.pl'.

;;; It implements hooks that allow SWI-Prolog to give compilation-warnings
;;; back to EMACS, so the user can step through them using the normal
