       (let ((inhibit-read-only t)
             (buffer-undo-list t))
         (erase-buffer)
-        (mapcar 
+        (mapcar
          (lambda (pos)
            (lexical-let*
                ((start (assoc 'start pos))

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

;;;;;;;;;;;;

   (if (< start end) (buffer-substring-no-properties start end) ""))

(defun merlin-tell-source (code)
  "Tell CODE to merlin and returns whether the position if marker is still active."
  (let ((result (merlin-send-cursor-command `(tell source ,code))))
     (when (cdr result) (car result))))

(defun merlin-tell-rest ()
  "Put a marker and tell merlin until marker is satisfied."
  (let* ((marker (cdr (merlin-send-cursor-command '(tell marker))))
         (point (when marker (point))))
    (while (and point (not (= point (point-max))))
      (forward-line 10)
      (setq point (merlin-tell-source (merlin-buffer-substring point (point))))))
    (when point (merlin-send-cursor-command '(tell eof))))

(defun merlin-tell-to-point (&optional point)
  "Tell to merlin part of the buffer between START and END. START
may be nil, in that case the current cursor of merlin is used."
  (let* ((point (if point point (point)))
         (start (min point merlin-dirty-point))
         (start (car (merlin-send-cursor-command
                       `(tell start at ,(merlin-unmake-point start))))))
    (setq merlin-dirty-point point)
    (save-excursion
      (merlin-tell-source (merlin-buffer-substring start point))
      (goto-char point)
      (merlin-tell-rest))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; POINT SYNCHRONIZATION ;;
