Function: info-xref-all-info-files
info-xref-all-info-files is a byte-compiled function defined in
info-xref.el.gz.
Signature
(info-xref-all-info-files)
Documentation
Return a list of all available info files.
Only top level files are returned, subfiles are excluded.
Since info files don't have to have a .info suffix, all files in the relevant directories are considered, which might mean a lot of extraneous things if for instance a source code directory is in the path.
Source Code
;; Defined in /usr/src/emacs/lisp/info-xref.el.gz
;; An alternative for getting only top-level files here would be to simply
;; return all files and have info-xref-check-list not follow "Indirect:".
;; The current way seems better because it (potentially) gets the proper
;; top-level filename into the error messages, and suppresses duplicate "not
;; available" messages for all subfiles of a single document.
(defun info-xref-all-info-files ()
"Return a list of all available info files.
Only top level files are returned, subfiles are excluded.
Since info files don't have to have a .info suffix, all files in
the relevant directories are considered, which might mean a lot
of extraneous things if for instance a source code directory is
in the path."
(info-initialize) ;; establish Info-directory-list
(apply 'nconc
(mapcar
(lambda (dir)
(let ((result nil))
(dolist (name (directory-files
dir
t ;; absolute filenames
"\\`[^.]")) ;; not dotfiles, nor .# lockfiles
(when (and (file-exists-p name) ;; ignore broken symlinks
(not (string-match "\\.te?xi\\'" name)) ;; not .texi
(not (backup-file-name-p name))
(not (file-directory-p name))
(not (info-xref-subfile-p name)))
(push name result)))
(nreverse result)))
(append Info-directory-list Info-additional-directory-list))))