 Return t if there were not any or nil if there were.  Moreover, it displays the
 errors in the margin.  If VIEW-ERRORS-P is non-nil, display a count of them."
   (merlin-error-reset)
-  (merlin-seek-end)
   (let* ((errors (merlin-send-command 'errors))
          (errors (delete-if (lambda (e) (not (assoc 'start e))) errors))
          (errors (if merlin-report-warnings errors

  "Use PKG in the current session of merlin."
  (interactive
   (list (completing-read "Package to use: " (merlin-get-packages))))
  (let* ((r (merlin-send-command (list 'find 'use (list pkg))))
         (failed (assoc 'failures r)))
    (when failed (message (cdr failed))))
  (merlin-error-reset))

(defun merlin-load-project-file ()
  "Load the .merlin file corresponding to the current file."
  (interactive)
  (merlin-rewind)
  (let* ((r (merlin-send-command (list 'project 'find (buffer-file-name))))
         (failed (assoc 'failures r))
         (result (assoc 'result r)))
    (when failed (message (cdr failed)))
    (when (and result (listp (cdr result)))
      (setq merlin-project-file (cadr result)))))

(defun merlin-goto-project-file ()
  "Goto the merlin file corresponding to the current file."

(defun merlin-locate-pure (ident)
  "Locate the identifier IDENT at point."
  (merlin-sync-to-point)
  (let* ((result (merlin-send-command
             (list 'locate (substring-no-properties ident)
                   'at (merlin-unmake-point (point))))))
    (if (and result (listp result))
        (merlin-goto-file-and-point result)
      (message "%s not found." ident))))

(defun merlin-locate ()
