   (merlin-send-command "find" (list "use" (list pkg)))
   (merlin-rewind))
 
-(defvar merlin--project-file nil "The .merlin file for current buffer")
 (defun merlin-load-project-file ()
   "Load the .merlin file corresponding to the current file."
   (interactive)
   (merlin-rewind)
   (let ((r (merlin-send-command "project" (list "find" (buffer-file-name)))))
     (if (and r (listp r))
-        (setq merlin--project-file (car r)))))
+        (setq merlin-project-file (car r)))))
 
 (defun merlin-goto-project-file ()
   "Goto the merlin file corresponding to the current file."
   (interactive)
-  (let ((file merlin--project-file))
+  (let ((file merlin-project-file))
     (if file
         (find-file-other-window file)
       (message "No project file for the current buffer."))))
 ;; Locate
-(defvar merlin-position-stack nil)
 (defun merlin-locate ()
   "Locate the identifier under point"
   (interactive)

  (ac-define-source "merlin" merlin-ac-source))

;; Usual completion
(defun merlin--completion-lookup (string state)
  "Lookup the entry `STRING' inside the completion table."
  (let ((ret (assoc string merlin--completion-annotation-table)))
    (if ret
        (message "%s%s" (car ret) (cdr ret)))))
(defun merlin-completion-at-point ()

;;    (define-key merlin-menu-map [customize]
;;      '("Customize merlin-mode" . merlin-customize))
    (define-key merlin-menu-map [separator]
      '("-"))
    (define-key merlin-show-type-map [local]
      '(menu-item "around the cursor" merlin-magic-show-type
                  :help "Show the type of the smallest subexpression near cursor"))
