                       )))
                  (if (null module)
                      (error "Can't find completion for \"%s\"" pattern)
-                   (delete-region beg end)
+                   (message "Completion found in module %s" module)
+                   (if (and (consp module-entry) (consp (cdr module-entry)))
+                       (delete-region (caar module-entry) end)
+                     (delete-region beg end))
                    (insert module "." pattern))))
                      
               ((not (string-equal pattern completion))

               (insert completion))

              (t
               (with-output-to-temp-buffer "*Help*"
                 (display-completion-list all-completions))
               ))
               ))))


;; Info files


(defun ocaml-info-add-entries-old (entries dir name)
  (let*
      ((filter
        (concat "-type f -regex '.*/" name

              ((null completion)
               (let*
                   ((modules (ocaml-find-module pattern))
                    (hist)
                    (module
                     (cond
                      ((null modules)
