   (let (sofar)
     (cond ((setq sofar (prolog-completion-sofar))
 	   (send-prolog (concat 
-			 "'$silent'(qp_dabbrev_atom(\""
+			 "'$silent'(emacs_dabbrev_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)

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