Function: hypb:package-compatible
hypb:package-compatible is a byte-compiled function defined in
hypb.el.
Signature
(hypb:package-compatible PKG)
Documentation
Check if PKG symbol is compatible with the current Emacs version.
If it is, return t. If it is not, return a string of the minimum Emacs version required.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20261030.2317/hypb.el
(defun hypb:package-compatible (pkg)
"Check if PKG symbol is compatible with the current Emacs version.
If it is, return t. If it is not, return a string of the minimum Emacs
version required."
;; Get package archive data when not already loaded
(unless package-archive-contents
(package-initialize)
(unless package-archive-contents
(package-refresh-contents)))
;; Compare required package Emacs version to the current Emacs version
(let* ((desc (cadr (assq pkg package-archive-contents)))
(reqs (and desc (package-desc-reqs desc)))
(emacs-version-required (cadr (assq 'emacs reqs))))
(if emacs-version-required
(or (version-list-<= emacs-version-required (version-to-list emacs-version))
(mapconcat (lambda (part) (format "%s" part)) emacs-version-required "."))
;; Returns t by default if the package doesn't include a minimum Emacs version
t)))