; Fix handling of string by the use-package keyword :vc

This makes :vc behave more like 'package-vc-install'.

* lisp/use-package/use-package-core.el (use-package-normalize/:vc):
Translate :vc arguments that are just a string into a minimal
package specification containing only a :url field, thus
preventing a type error down the line.
This commit is contained in:
Philip Kaludercic
2026-03-16 18:23:22 +01:00
parent aa90b0fb4a
commit 4147410852

View File

@@ -1796,7 +1796,7 @@ node `(use-package) Creating an extension'."
(pcase arg
((or 'nil 't) (list name)) ; guess name
((pred symbolp) (list arg)) ; use this name
((pred stringp) (list name arg)) ; version string + guess name
((pred stringp) (list name (list :url arg))) ; URL + guess name
(`(,(pred keywordp) . ,(pred listp)) ; list + guess name
(use-package-normalize--vc-arg (cons name arg)))
(`(,(pred symbolp) . ,(or (pred listp) ; list/version string + name