Function: inversion-test
inversion-test is a byte-compiled function defined in inversion.el.gz.
Signature
(inversion-test PACKAGE MINIMUM &rest RESERVED)
Documentation
Test that PACKAGE meets the MINIMUM version requirement.
PACKAGE is a symbol, similar to what is passed to require.
MINIMUM is of similar format to return entries of
inversion-decode-version, or a classic version string.
RESERVED arguments are kept for a later user.
This depends on the symbols PACKAGE-version and optionally
PACKAGE-incompatible-version being defined in PACKAGE.
Return nil if everything is ok. Return an error string otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/inversion.el.gz
(defun inversion-test (package minimum &rest reserved)
"Test that PACKAGE meets the MINIMUM version requirement.
PACKAGE is a symbol, similar to what is passed to `require'.
MINIMUM is of similar format to return entries of
`inversion-decode-version', or a classic version string.
RESERVED arguments are kept for a later user.
This depends on the symbols `PACKAGE-version' and optionally
`PACKAGE-incompatible-version' being defined in PACKAGE.
Return nil if everything is ok. Return an error string otherwise."
(let ((check (inversion-check-version
(inversion-package-version package)
(inversion-package-incompatibility-version package)
minimum reserved)))
(cond
((null check)
;; Same version.. Yay!
nil)
((eq check 'outdated)
;; Version is too old!
(format "You need to upgrade package %s to %s" package minimum))
((eq check 'incompatible)
;; Newer is installed but the requested version is = or < than
;; what the package maintainer says is incompatible, then throw
;; that error.
(format "Package %s version is not backward compatible with %s"
package minimum))
;; Check failed
(t "Inversion version check failed."))))