                (while (and event
                            (integer-or-marker-p
                             (setq cnum (caml-event-point-end event))))
-                 (if (and region (<= (car region) cnum) (<= cnum (cdr region)))
+                 (if (and region (<= (car region) cnum) (< cnum (cdr region)))
                      (if (and limits
                               (>= cnum (car limits)) (< cnum (cdr limits)))
                          (message mes)

         (target-file (file-name-nondirectory (buffer-file-name)))
         (target-date (nth 5 (file-attributes target-file))))
    (unless (and caml-types-annotation-tree
                 (not (caml-types-date< caml-types-annotation-date type-date)))
      (if (and type-date target-date (caml-types-date< type-date target-date))
          (error (format "%s is more recent than %s" target-file type-file)))

                           (setq type "*no type information*")
                           (setq limits
                                 (caml-types-find-interval
                                  target-buf target-pos target-tree))
                           ))
                         (message (setq mes (format "type: %s" type)))
                         (insert type)
