Improve ‘package-maint-add-news-item’ by using ‘completing-read’
Typos are too easy having to type in the ‘archive-url’ argument every time on its own. Since you’re probably posting to an archive that you also use, reading from the ‘package-archives’ seems appropriate.
This commit is contained in:
parent
c436c82f86
commit
a86d31cff6
1 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 20190203132826
|
;; Version: 20190218230337
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
;; it under the terms of the GNU General Public License as published by
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
@ -59,7 +59,11 @@
|
||||||
"Add a news item to the webpages associated with the package archive.
|
"Add a news item to the webpages associated with the package archive.
|
||||||
TITLE is the title of the news item.
|
TITLE is the title of the news item.
|
||||||
DESCRIPTION is the text of the news item."
|
DESCRIPTION is the text of the news item."
|
||||||
(interactive "sTitle: \nsText: \nsArchive URL: ")
|
(interactive
|
||||||
|
(list
|
||||||
|
(read-string "Title: ")
|
||||||
|
(read-string "Text: ")
|
||||||
|
(completing-read "Archive URL: " (mapcar 'cdr package-archives))))
|
||||||
(package--update-file "elpa.rss"
|
(package--update-file "elpa.rss"
|
||||||
"<description>"
|
"<description>"
|
||||||
(package--make-rss-entry title description archive-url))
|
(package--make-rss-entry title description archive-url))
|
||||||
|
|
Loading…
Reference in a new issue