 If a string list, check only if the extension of the buffer-file-name is in the list."
   :group 'merlin :type '(choice (repeat string) boolean))
 
-(defcustom merlin-error-in-margin t
-  "If non-nil, display errors in margin"
+(defcustom merlin-error-in-fringe t
+  "If non-nil, display errors in fringe"
   :group 'merlin :type 'boolean)
 
 (defcustom merlin-display-lock-zone nil
   "How to display the locked zone.
 It is a list of methods among:
    - `highlight': highlight the current locked zone (like proofgeneral)
-   - `margin': put a symbol (given by `merlin-margin-lock-string') in the margin
-     of the line where the zone ends.
+   - `fringe': put a symbol in the fringe of the line where the
+     zone ends.
 
 In particular you can specify nil, meaning that the locked zone is not represented on the screen."
   :group 'merlin :type '(repeat
                          (choice (const :tag "Highlight the locked zone" highlight)
-                                 (const :tag "Display a marker in the left margin at the end of the locked zone" margin))))
+                                 (const :tag "Display a marker in the left fringe at the end of the locked zone" fringe))))
 
 (defcustom merlin-default-flags nil
   "The flags to give to ocamlmerlin."

          (push #'merlin--kill-error-if-edited
                (overlay-get overlay 'modification-hooks))
          (if (merlin-error-warning-p (cdr (assoc 'message err)))
            (merlin-put-margin-overlay overlay
                                       merlin-margin-warning-string
                                       'merlin-compilation-warning-face)
            (merlin-put-margin-overlay overlay
                                       merlin-margin-error-string
                                       'merlin-compilation-error-face))
          overlay)))))

(defun merlin--error-check (view-errors-p)
  "Check for errors.
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-sync-to-point (point-max) t)
  (let* ((errors (merlin-send-command 'errors))

      (merlin-error-gc)
      (when merlin-lock-zone-highlight-overlay
        (delete-overlay merlin-lock-zone-highlight-overlay))
      (when merlin-lock-zone-fringe-overlay
        (delete-overlay merlin-lock-zone-fringe-overlay))
      (when merlin-highlight-overlay
        (delete-overlay merlin-highlight-overlay))
      ;;(merlin-error-delete-overlays)
