 (defun merlin-auto-complete-candidates ()
   "Return the candidates for auto-completion with
   auto-complete. If the cache is wrong then recompute it."
-  (if (not (and (equal (merlin-completion-prefix ac-prefix) merlin-ac-prefix)
+  (if (not (and (equal (merlin--completion-prefix ac-prefix) merlin-ac-prefix)
                 (string-prefix-p merlin-ac-ac-prefix ac-prefix)))
       (merlin-ac-source-refresh-cache))
   merlin-ac-cache)

;; COMPLETION-AT-POINT SUPPORT ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun merlin-completion-format-entry (entry)
  "Format the completion entry ENTRY."
  (let* ((kind (cdr (assoc 'kind entry)))
         (desc (cdr (assoc 'desc entry)))


(defun merlin-ac-source-refresh-cache()
  "Refresh the cache of completion."
  (setq merlin-ac-prefix (merlin--completion-prefix ac-prefix))
  (setq merlin-ac-ac-prefix ac-prefix)
  (setq merlin-ac-cache (mapcar #'merlin-ac-make-popup-item
                                (merlin--completion-data ac-prefix))))


(defun merlin-ac-source-init ()
