                                          beg end (current-buffer))
                            (sit-for 60))
                        (delete-overlay caml-error-overlay)))))))))
+
+(defun caml-next-error-skip-warnings (&rest args)
+  (let ((old-flag caml-next-error-skip-warnings-flag))
+    (unwind-protect
+        (progn (setq caml-next-error-skip-warnings-flag 't)
+               (apply 'next-error args))
+      (setq caml-next-error-skip-warnings-flag old-flag))))
+    
 
 ;; Usual match-string doesn't work properly with font-lock-mode
 ;; on some emacs.

possible."

 (if (eq major-mode 'caml-mode)
     (let (bol beg end)
       (save-excursion
         (set-buffer
          (if (boundp 'compilation-last-buffer)

                      (buffer-substring (match-beginning 1) (match-end 1)))
                     end
                     (string-to-int
                      (buffer-substring (match-beginning 2) (match-end 2)))))
           (next-line)
           (beginning-of-line)
           (if (and (looking-at "Warning")
                    caml-next-error-skip-warnings-flag)
               (setq skip 't))))
       (cond
        (skip (next-error))
        (beg
              (setq end (- end beg))
              (beginning-of-line)
              (forward-byte beg)
