     (define-key merlin-menu-map [error]
       '(menu-item "Error check" merlin-error-check
                   :help "Check current buffer for any error."))
+    (define-key merlin-menu-map [dot-merlin]
+      '(menu-item "dot-merlin check" merlin-project-check
+                  :help "Display status of '.merlin'."))
     (define-key merlin-menu-map [addflag]
       '(menu-item "Add a flag" merlin-process-add-flag
                   :help "Add a flag to be passed to ocamlmerlin after restarting it."))

    (merlin-error-reset)
    (setq merlin-dirty-point (point-min))))

(defun merlin--acquire-load-project-file ()
  "Load the .merlin file corresponding to the current buffer."
  (merlin--reset)
  (let* ((r (merlin-send-command '(project get)))
         (failed (assoc 'failures r))
         (result (assoc 'result r)))
    (when failed (mapcar #'message (cdr failed)))
    (when (and result (listp (cdr result)))
      (setq merlin-project-file (cadr result)))))

(defun merlin--acquire-buffer (&optional force)
  "Prepare merlin to receive data from current buffer."


(defun merlin-lighter ()
  "Return the lighter for merlin which indicates the status of merlin process."
  (if (merlin-process-dead-p) " merlin (DEAD)"
    (let* ((messages nil)
           (project (merlin--project-get)))
      (when merlin-report-dot-merlin-in-lighter
        (cond ((cdr project) (add-to-list 'messages "errors in .merlin"))
              ((not (car project)) (add-to-list 'messages "no .merlin"))))
      (when merlin-show-instance-in-lighter
        (add-to-list 'messages merlin-instance))
      (if messages (concat " merlin (" (mapconcat 'identity messages ",") ")")
          " merlin"))))

;;;###autoload

