package.el: Allow Package-Requires to span multiple lines (Bug#36301)

* lisp/emacs-lisp/package.el (lm-header-multiline): Declare
function.
(package-buffer-info): Parse Package-Requires with
lm-header-multiline instead of lm-header.
(Bug#36301)
This commit is contained in:
Thomas Fitzsimmons 2019-08-15 23:57:55 -04:00
parent c02f3125cd
commit 19c1e4c81c

View file

@ -1028,6 +1028,7 @@ is wrapped around any parts requiring it."
deps))))
(declare-function lm-header "lisp-mnt" (header))
(declare-function lm-header-multiline "lisp-mnt" (header))
(declare-function lm-homepage "lisp-mnt" (&optional file))
(declare-function lm-keywords-list "lisp-mnt" (&optional file))
(declare-function lm-maintainer "lisp-mnt" (&optional file))
@ -1054,7 +1055,8 @@ boundaries."
(narrow-to-region start (point))
(require 'lisp-mnt)
;; Use some headers we've invented to drive the process.
(let* ((requires-str (lm-header "package-requires"))
(let* ((requires-str
(mapconcat 'identity (lm-header-multiline "package-requires") " "))
;; Prefer Package-Version; if defined, the package author
;; probably wants us to use it. Otherwise try Version.
(pkg-version