               (right (caml-types-get-pos target-buf (elt node 1)))
               (kind (cdr (assoc "call" (elt node 2)))))
           (move-overlay caml-types-expr-ovl left right target-buf)
-          (with-current-buffer caml-types-buffer
-            (erase-buffer)
-            (insert kind)
-            (message (format "%s call" kind)))))))
+          (caml-types-feedback kind)))))
     (if (and (= arg 4)
              (not (window-live-p (get-buffer-window caml-types-buffer))))
         (display-buffer caml-types-buffer))

                                   var-name l-line (- l-cnum l-bol))))))
             ((string-match external-re kind)
              (let ((fullname (match-string 1 kind)))
                (with-current-buffer caml-types-buffer
                  (erase-buffer)
                  (insert fullname)
                  (message (format "external ident: %s" fullname)))))))))))
    (if (and (= arg 4)
             (not (window-live-p (get-buffer-window caml-types-buffer))))
        (display-buffer caml-types-buffer))

      (require 'caml-xemacs)
    (require 'caml-emacs)))

(defun caml-types-feedback (info format)
  "Displays INFO using the given FORMAT."
  (message (format format info))
  (with-current-buffer caml-types-buffer
    (erase-buffer)
    (insert info)))

(defvar caml-types-build-dirs '("_build" "_obuild")
  "List of possible compilation directories created by build systems.
