 (defun caml-overlap (b1 e1 b2 e2)
   (<= (max b1 b2) (min e1 e2)))
 
-;this clears the last comment cache if necessary
-(defun caml-before-change-function (begin end)
-  (if (and caml-last-noncomment-pos
-           (> caml-last-noncomment-pos begin))
-      (setq caml-last-noncomment-pos nil))
-  (if (and (marker-position caml-last-comment-start)
-           (marker-position caml-last-comment-end)
-           (caml-overlap begin end
-                         caml-last-comment-start
-                         caml-last-comment-end))
-      (prog2
-          (set-marker caml-last-comment-start nil)
-          (set-marker caml-last-comment-end nil)))
-  (let ((orig-function (default-value 'before-change-function)))
-    (if orig-function (funcall orig-function begin end))))
-
 (defun caml-in-literal-p ()
   "Returns non-nil if point is inside a caml literal."
   (let* ((start-literal (concat "[\"" caml-quote-char "]"))


;; Other internal variables

(defvar caml-last-noncomment-pos nil
  "Caches last buffer position determined not inside a caml comment.")
(make-variable-buffer-local 'caml-last-noncomment-pos)

;;last-noncomment-pos can be a simple position, because we nil it
;;anyway whenever buffer changes upstream. last-comment-start and -end
;;have to be markers, because we preserve them when the changes' end
;;doesn't overlap with the comment's start.

(defvar caml-last-comment-start nil
  "A marker caching last determined caml comment start.")
(make-variable-buffer-local 'caml-last-comment-start)

(defvar caml-last-comment-end nil
  "A marker caching last determined caml comment end.")
(make-variable-buffer-local 'caml-last-comment-end)

(make-variable-buffer-local 'before-change-function)

(defvar caml-imenu-shown nil
  "True if we have computed definition list.")
(make-variable-buffer-local 'caml-imenu-shown)

  ;itz Fri Sep 25 13:23:49 PDT 1998
  (make-local-variable 'add-log-current-defun-function)
  (setq add-log-current-defun-function 'caml-current-defun)
  ;garrigue 27-11-96
  (setq case-fold-search nil)
  ;garrigue july 97
