       )))
 
 (defun caml-complete (arg)
-  "Complete symbol define in libraries"
+  "Does completion for qualified identifiers. 
+
+It attemps to recognize an qualified identifier Module . entry 
+around point using function \\[ocaml-qualified-identifier].
+
+If Module is defined, it does completion for identifier in Module.
+
+If Module is undefined, it does completion in visible modules. 
+Then, if completion fails, it does completion among  all modules 
+where identifier is defined. 
+"
   (interactive "p")
-  (let* ((module-entry (ocaml-current-position))
+  (let* ((module-entry (ocaml-qualified-identifier))
          (module)
          (entry (cdr module-entry))
          (beg) (end) (pattern))

      (set-buffer (get-buffer-create "*caml-help*"))
      (setq command
            (concat "gunzip -c -f " files
                " | grep -e '" ocaml-info-section-regexp "'"))
      (message command)
      (or (shell-command command (current-buffer)) (error "HERE"))
      (goto-char (point-min))
      (while (re-search-forward ocaml-info-section-regexp (point-max) t)
        (let* ((module (match-string 2))
               (section (match-string 1)))
          (message "%s %s" module section)

;; Info files


(defun ocaml-info-add-entries-old (entries dir name)
  (let*
      ((filter
        (concat "-type f -regex '.*/" name
                "\\(.info\\|\\)\\(-[0-9]*\\|\\)\\([.]gz\\|\\)'"
                ))
       (section-regexp
        "\\* \\(Section [1-9][0-9--]*\\)::[ \t][ \t]*Module *\\([A-Z][A-Za-z_0-9]*\\)")
       (files (ocaml-find-files dir filter))
       (command))
    ;; scanning info files
