 
 (defun merlin--error-warning-p (msg)
   "Tell if the message MSG is a warning."
-  (string-match "^Warning" msg))
+  (string-match-p "^Warning" msg))
 
 (defun merlin-error-reset ()
   "Clear error list."
   (interactive)
   (setq merlin-erroneous-buffer nil)
   (remove-overlays nil nil 'merlin-kind 'error))
-
-(defun merlin--overlay (overlay)
-  "Returns non-nil if OVERLAY is managed by merlin."
-  (if overlay (overlay-get overlay 'merlin-kind) nil))
 
 (defun merlin--overlay-pending-error (overlay)
   "Returns non-nil if OVERLAY is about a pending error."

(defun merlin--is-short (text)
  (let ((count 0)
        (pos   0))
    (while (and (<= count 8)
                (string-match "\n" text pos))
           (setq pos (match-end 0))
           (setq count (1+ count)))
    (<= count 8)))

(defun merlin/display-in-type-buffer (text)
  "Change content of type-buffer."

  (if (or (not target) (equal target ""))
    (setq target "fun let module match"))
  (let ((result (merlin/call "phrase"
                 "-position" (merlin/unmake-point)
                 "-target" target)))
    (unless result
      (error "Not found. (Check *Messages* for potential errors)"))
