 (defun merlin-show-type-of-point-quiet ()
   "Show the type of the identifier under the point if it is short (a value)"
   (merlin-check-synchronize t)
-  (merlin-show-type (bounds-of-thing-at-point 'ocamlatom) &optional t))
+  (merlin-show-type (bounds-of-thing-at-point 'ocamlatom) t))
 
 (defun merlin-show-type-of-point (arg) 
   "Show the type of the identifier under the point. If it is called with a prefix argument, then show the type of the region."

(defun merlin-tell-till-end-of-phrase ()
  "Tell merlin the buffer until the end of phrase.
It proceeds by telling (with the end mode) each line until it returns true or until we are at the end of the buffer"
  (save-excursion
    (end-of-line)
    (let ((temp-point (point))
        (end-p nil))
      (forward-line 1)
      (while (and (not end-p) (< (point) (point-max)))
        (if (equal ;; this is not tautological since value is never nil
             (merlin-is-return ;; tell end returned true => we are done
              (merlin-tell-piece "end" temp-point (point)))
             t)
            (progn
              (merlin-debug "OK BUDDY")
              (setq end-p t))
          (progn
            (setq temp-point (point))
            (forward-line 1)
            (end-of-line))))
          ;; End of buffer
          (if (not end-p)
              (merlin-send-command "tell" '("end" nil)))
          (merlin-get-position))))
      
      
      
  

  (setq merlin-overlay (make-overlay (point-min) merlin-lock-point))
  (overlay-put merlin-overlay 'face 'merlin-locked-face))

(defun merlin-update-point (view-errors-p)
  "Moves the merlin point to around the given the current
point. It proceeds as follows: 

- It retracts merlin from the point given in argument to get it
to the last phrase ending.

- It tells merlin the contents between the last phrase known to
merlin and the argument

- It continues until it finds the end of a phrase.

The parameter `view-errors-p' controls whether we should care for errors"
  (merlin-delete-error-overlays)
  (save-excursion
    (end-of-line)
    (setq merlin-lock-point (merlin-retract-to (point)))
    (merlin-tell-piece-split "struct" merlin-lock-point (point))
    (setq merlin-lock-point (merlin-tell-till-end-of-phrase))
    (if (not (merlin-view-errors view-errors-p))
        (let ((msg (current-message)))
          (setq merlin-lock-point (merlin-seek merlin-lock-point))
          (message msg)))
    (merlin-update-overlay))
)    
  
(defun merlin-check-synchronize (&optional clean)
  "If merlin point is before the end of line send everything up to the end of line"
  (interactive)
  (let ((p merlin-lock-point))
    (if (> (point-at-eol) merlin-lock-point)
        (merlin-update-point nil))))

(defun merlin-edit (start end length)
  (if (< start merlin-lock-point)
      (progn
        (message "point: %d start! %d" (point) start)
        (merlin-update-point nil))))
;; COMPLETION
(defun merlin-extract-complete (prefix l)
  "Parses and format completion results"
