Function: woman-topic-all-completions

woman-topic-all-completions is a byte-compiled function defined in woman.el.gz.

Signature

(woman-topic-all-completions PATH)

Documentation

Return an alist of the man files in all man directories in the list PATH.

The cdr of each alist element is the path-index / filename.

Source Code

;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-topic-all-completions (path)
  "Return an alist of the man files in all man directories in the list PATH.
The cdr of each alist element is the path-index / filename."
  ;; Support 3 levels of caching: each element of the alist `files'
  ;; will be a list of the first `woman-cache-level' elements of the
  ;; following list: (topic path-index filename).  This alist `files'
  ;; is re-processed by `woman-topic-all-completions-merge'.
  (let (dir files (path-index 0))	; indexing starts at zero
    (while path
      (setq dir (pop path))
      (if (woman-not-member dir path)	; use each directory only once!
	  (push (woman-topic-all-completions-1 dir path-index)
		files))
      (setq path-index (1+ path-index)))
    ;; Uniquify topics:
    ;; Concatenate all lists with a single nconc call to
    ;; avoid retraversing the first lists repeatedly  -- dak
    (woman-topic-all-completions-merge
     (apply #'nconc files))))