   (ignore-errors (delete-process (merlin-get-process)))
   (kill-buffer (merlin-get-process-buffer-name))
   (with-current-buffer (merlin-get-process-buffer-name)
-    (tq-close merlin--queue))
+    (tq-close merlin-queue))
 )
 (defun merlin-wait-for-answer ()
   "Waits for merlin to answer."

  (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)))))

(defun merlin-goto-project-file ()
  "Goto the merlin file corresponding to the current file."
  (interactive)
  (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)

;;    (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"))
