Fix doom/help-packages

Also adds doom-package-backend function.

TODO: Report more information about straight packages.
This commit is contained in:
Henrik Lissner 2019-07-28 23:27:17 +02:00
parent 00a4701b16
commit e3d6d13be5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 47 additions and 25 deletions

View file

@ -101,6 +101,19 @@ A protected package cannot be deleted and will be auto-installed if missing."
(or (doom-package-protected-p package)
(assq :core (doom-package-get package :modules))))
;;;###autoload
(defun doom-package-backend (package)
"Return 'straight, 'builtin, 'elpa or 'other, depending on how PACKAGE is
installed."
(cond ((gethash (symbol-name package) straight--build-cache)
'straight)
((or (doom-package-built-in-p package)
(assq package package--builtins))
'builtin)
((assq package package-alist)
'elpa)
('other)))
;;;###autoload
(defun doom-package-different-recipe-p (name)
"Return t if a package named NAME (a symbol) has a different recipe than it