Function: inversion-locate-package-files-and-split
inversion-locate-package-files-and-split is a byte-compiled function
defined in inversion.el.gz.
Signature
(inversion-locate-package-files-and-split PACKAGE DIRECTORY &optional VERSION)
Documentation
Use inversion-locate-package-files to get a list of PACKAGE files.
DIRECTORY is the location where distributions of PACKAGE are. VERSION is an optional argument specifying a version to restrict to. The return list is an alist with the version string in the CAR, and the full path name in the CDR.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/inversion.el.gz
(defun inversion-locate-package-files-and-split (package directory &optional version)
"Use `inversion-locate-package-files' to get a list of PACKAGE files.
DIRECTORY is the location where distributions of PACKAGE are.
VERSION is an optional argument specifying a version to restrict to.
The return list is an alist with the version string in the CAR,
and the full path name in the CDR."
(if (symbolp package) (setq package (symbol-name package)))
(let ((f (inversion-locate-package-files package directory version))
(out nil))
(while f
(let* ((file (car f))
(dist (file-name-nondirectory file))
(tails inversion-package-common-tails)
(verstring nil))
(while (and tails (not verstring))
(when (string-match (concat (car tails) "$") dist)
(setq verstring
(substring dist (1+ (length package)) (match-beginning 0))))
(setq tails (cdr tails)))
(if (not verstring)
(error "Cannot decode version for %s" dist))
(setq out
(cons
(cons verstring file)
out))
(setq f (cdr f))))
out))