Ensure package contents for package suggestions

* lisp/emacs-lisp/package.el (package--autosugest-prompt): Query
archives if the package being described is not listed in
package-archive-contents'.
This commit is contained in:
Philip Kaludercic 2026-02-12 18:24:47 +01:00
parent 02af0e93a0
commit 1b02bf1214
No known key found for this signature in database

View file

@ -4578,7 +4578,12 @@ so you have to select which to install!)" nl))
(package--autosuggest-install-and-enable
(car sugs))
(quit-window)))
" (" (buttonize "about" #'describe-package pkg)
" ("
(buttonize "about"
(lambda (_)
(unless (assq pkg package-archive-contents)
(package-read-all-archive-contents))
(describe-package pkg)))
", matches ")
(dolist (sug sugs)
(unless (eq (char-before) ?\s)