     (let ((start (point)))
       (skip-syntax-forward "w_.")
       (list start (point)
-            (apply-partially #'merlin--completion-table start)
-            . (:exit-function #'merlin--completion-lookup
-              :annotation-function '(lambda (s) (cdr (assoc s merlin--completion-annotation-table))))))))
+            (apply-partially #'merlin-completion-table start)
+            . (:exit-function #'merlin-completion-lookup
+              :annotation-function '(lambda (s) (cdr (assoc s merlin-completion-annotation-table))))))))
             
 
-(defvar merlin--completion-cache-state nil)
-(defvar merlin--completion-annotation-table nil
-  "Hold a table mapping completion candidates to their types")
-(make-variable-buffer-local 'merlin--completion-cache-state)
-(make-variable-buffer-local 'merlin--completion-annotation-table)
 
 
 (defun merlin-completion-annotate (s)
-  (cdr (assoc s merlin--completion-annotation-table)))
-(defun merlin--completion-table (start string pred action)
+  (cdr (assoc s merlin-completion-annotation-table)))
+(defun merlin-completion-table (start string pred action)
   (if (eq 'metadata action)
       (when merlin-completion-types
         '(metadata (annotation-function . merlin-completion-annotate)))
-    (unless (and merlin--completion-annotation-table
-                 (eq (car merlin--completion-cache-state) start)
-                 (string-prefix-p (cdr merlin--completion-cache-state)
+    (unless (and merlin-completion-annotation-table
+                 (eq (car merlin-completion-cache-state) start)
+                 (string-prefix-p (cdr merlin-completion-cache-state)
                                   string completion-ignore-case)
                  (string-equal (merlin-compute-prefix string)
-                               (merlin-compute-prefix (cdr merlin--completion-cache-state))))
+                               (merlin-compute-prefix (cdr merlin-completion-cache-state))))
       (save-excursion
         (goto-char start)
-        (setq merlin--completion-annotation-table 
+        (setq merlin-completion-annotation-table 
               (merlin-get-completion-data string)))
-      (setq merlin--completion-cache-state (cons start string)))
-    (complete-with-action action merlin--completion-annotation-table string pred)))
+      (setq merlin-completion-cache-state (cons start string)))
+    (complete-with-action action merlin-completion-annotation-table string pred)))
 
 
 ;; Switch to ML file
-(defun merlin--list-by-ext (ext)
+(defun merlin-list-by-ext (ext)
   "Lists filenames ending by EXT in the path"
   (append (merlin-send-command "which" (list "with_ext" ext))
           nil))
 
-(defun merlin--switch-to (name ext)
+(defun merlin-switch-to (name ext)
   "Switch to NAME.EXT."
   (let ((file
          (merlin-send-command "which" (list "path" (concat (downcase name) "." ext))

            (replace-regexp-in-string "^[^:]+:[ \n]+" ": " (cdr (assoc 'desc c)))))))
            data)))
                 
;; Vars from auto-complete
(defvar ac-point)
(defvar ac-prefix)
(defvar ac-sources)

(defun merlin-source-init ()
  "Called at the beginning of a completion to fill the cache (the

;; auto-complete is not
(require 'auto-complete nil 'noerror)

(defgroup merlin nil
  "merlin binding mode allowing completion and typing in OCaml files."
  :group 'languages)

;;
;; Faces
;;
