               (if (merlin-error-warning-p (cdr (assoc 'message err)))
                   (merlin-put-margin-overlay overlay
                                              merlin-margin-warning-string
-                                             compilation-warning-face)
+                                             merlin-compilation-warning-face)
                 (merlin-put-margin-overlay overlay
                                            merlin-margin-error-string
-                                           compilation-error-face))
+                                           merlin-compilation-error-face))
               overlay)))
          (errors   (mapcar err-point errors)))
     (setq merlin-pending-errors errors)

(defcustom merlin-locate-focus-new-window t
  "If non-nil, when locate opens a new window it will give it the focus."
  :group 'merlin :type 'boolean)

;;;;;;;;;;;;;;;;;;;;;;;;
;; Internal variables ;;

(defun merlin-put-margin-overlay (overlay string &optional face)
  "Put a margin overlay inside OVERLAY, with face FACE and string STRING."
  (set-window-margins nil 1)
  (when face (overlay-put overlay 'face (eval face)))
  (overlay-put overlay 'before-string
               (propertize " " 'display `((margin left-margin) ,string))))

