branch: elpa-admin commit 753253237bfa1fc27478133e98f2302807a9fdbf Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
* elpa-admin.el (elpaa--get-README): Re-add (elpaa--html-make-pkg): Use it. --- elpa-admin.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/elpa-admin.el b/elpa-admin.el index 272dc88..f3d4593 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -1319,6 +1319,17 @@ arbitrary code." (delete-file input-filename) (delete-file output-filename)))) +(defun elpaa--get-README (pkg-spec dir) + (or (elpaa--get-section + "Commentary" (elpaa--spec-get pkg-spec :readme + '("README" "README.rst" + ;; Most README.md files seem to be + ;; currently worse than the Commentary: + ;; section :-( "README.md" + "README.org")) + dir pkg-spec) + '(text/plain . "!No description!"))) + (defun elpaa--get-NEWS (pkg-spec dir) (let* ((news (elpaa--get-section @@ -1421,17 +1432,7 @@ arbitrary code." (insert (format "<p>To install this package, run in Emacs:</p> <pre>M-x <span class=\"kw\">package-install</span> RET <span class=\"kw\">%s</span> RET</pre>" name)) - (let* ((package-readme-file-name - (elpaa--spec-get pkg-spec :readme - '("README" "README.rst" - ;; Most README.md files seem to be currently - ;; worse than the Commentary: section :-( - ;; "README.md" - "README.org"))) - (readme-content - (or (elpaa--get-section "Commentary" package-readme-file-name - srcdir pkg-spec) - '(text/plain . "!No description!"))) + (let* ((readme-content (elpaa--get-README pkg-spec srcdir)) (readme-text (elpaa--section-to-plain-text readme-content)) (readme-html (elpaa--section-to-html readme-content)) (readme-output-filename (concat name "-readme.txt")))