     (setq merlin-enclosing-offset -1)))
 
 (defun merlin-magic-show-type (arg)
-  "Prints the type of the expression under point. If called several times at the same position,
-it will print types of bigger expressions around point (it will go up the ast). Called with a prefix argument, it will go down the AST. If there is no enclosing, falls back to `merlin-show-type-of-point'"
+  "Print the type of the expression under point. If called several times at the same position,
+it will print types of bigger expressions around point (it will go up the ast). Called with a prefix argument, it will go down the AST. If there is no enclosing, falls back to `merlin-show-type-of-point'."
   (interactive "p")
   (save-excursion
     (forward-line)



(defun merlin-show-type-of-region ()
  "Show the type of the region"
  (interactive)
  (merlin-check-synchronize t)
  (merlin-show-type (cons (region-beginning) (region-end))))
(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) t))


;; UTILS

(defun merlin-debug (s)
  "If in debug-mode (controlled by `merlin-debug', output the given string
   on the buffer associated to the current merlin process."
  (with-current-buffer (merlin-get-process-buffer-name)
    (insert s)))

(defun merlin-compute-prefix (ident)
  "Compute the prefix of an identifier. The prefix of Foo.bar is Foo. and the prefix of bar is \"\"."
  (let* ((l (butlast (split-string ident "\\.")))
         (s (mapconcat 'identity l ".")))
    (if (string-equal s "") s (concat s "."))))

(defun merlin-make-point (data)
  "Create a point from a couple line / col."
  (save-excursion
    (beginning-of-line)
    (goto-line (cdr (assoc 'line data)))
    (forward-char (cdr (assoc 'col data)))
    (point)))
(defun merlin-make-bounds (data)
  "From a json object {\"start\": LOC1; \"end\": LOC2}
return (LOC1 . LOC2)."
  (cons
   (merlin-make-point (cdr (assoc 'start data)))
   (merlin-make-point (cdr (assoc 'end data)))))

(defun merlin-unmake-point (point)
  "Destruct the given point to line / col."
  (save-excursion
    (goto-char point)
    (list
