mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Add public interfaces for accessing builtin package info (Bug#78844)
* lisp/emacs-lisp/package.el (package-builtin-packages) (package-builtin-package-version): New functions. * doc/lispref/package.texi: Add a section 'Package Information' with documentation for the new functions. * etc/NEWS: Add entry for 'package-versioned-builtin-packages' and 'package-builtin-package-version'.
This commit is contained in:
parent
52b96d3a7e
commit
5c75ec6ae5
3 changed files with 48 additions and 0 deletions
|
|
@ -669,6 +669,21 @@ called via `package-activate-all'. To change which packages are
|
|||
loaded and/or activated, customize `package-load-list'.")
|
||||
(put 'package-alist 'risky-local-variable t)
|
||||
|
||||
;;;; Public interfaces for accessing built-in package info
|
||||
|
||||
(defun package-versioned-builtin-packages ()
|
||||
"Return a list of all the versioned built-in packages.
|
||||
The return value is a list of names of built-in packages represented as
|
||||
symbols."
|
||||
(mapcar #'car package--builtin-versions))
|
||||
|
||||
(defun package-builtin-package-version (package)
|
||||
"Return the version of a built-in PACKAGE given by its symbol.
|
||||
The return value is a list of integers representing the version of
|
||||
PACKAGE, in the format returned by `version-to-list', or nil if the
|
||||
package is built-in but has no version or is not a built-in package."
|
||||
(alist-get package package--builtin-versions))
|
||||
|
||||
;;;###autoload
|
||||
(defvar package-activated-list nil
|
||||
;; FIXME: This should implicitly include all builtin packages.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue