branch: elpa/helm commit d64b347da8ef92ee03b06c789aa1b7968b8782fe Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Allow using different elpa-packages(.eld) forms Recipes not have the same form depending from where we fetch them, they may be like ((foo :url "somewhere") (bar :url "somewhere")) or (((foo :url "somewhere") (bar :url "somewhere")) :version "1" :else "") So this allow using data fetched from either "https://elpa.gnu.org/packages/..." or "https://raw.githubusercontent.com/emacsmirror/gnu_elpa/..." --- helm-packages.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index e1c9b1171c..509484cd10 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -263,7 +263,16 @@ PROVIDER can be one of \"gnu\" or \"nongnu\"." (with-temp-buffer (url-insert-file-contents address) (goto-char (point-min)) - (car (read (current-buffer))))))) + (let ((data (read (current-buffer)))) + ;; Recipes not have the same form depending from + ;; where we fetch them, they may be like + ;; ((foo :url "somewhere") + ;; (bar :url "somewhere")) + ;; or + ;; (((foo :url "somewhere") + ;; (bar :url "somewhere")) + ;; :version "1" :else "") + (if (keywordp (cadr data)) (car data) data)))))) (package-recipe (assq package recipe)) (url (plist-get (cdr package-recipe) :url))) ;; In gnu archive all orphaned packages are pointing to