mirror of
https://github.com/correl/melpa.git
synced 2024-11-15 03:00:14 +00:00
Reject -pkg.el
files with multi-line package descriptions
See https://github.com/boyw165/hl-anything/issues/2
This commit is contained in:
parent
dc06d15eaf
commit
e0c4c53284
1 changed files with 5 additions and 2 deletions
|
@ -708,14 +708,17 @@ Optionally PRETTY-PRINT the data."
|
||||||
(when (file-exists-p file-path)
|
(when (file-exists-p file-path)
|
||||||
(let ((package-def (pb/read-from-file file-path)))
|
(let ((package-def (pb/read-from-file file-path)))
|
||||||
(if (eq 'define-package (car package-def))
|
(if (eq 'define-package (car package-def))
|
||||||
(let ((pkgfile-info (cdr package-def)))
|
(let* ((pkgfile-info (cdr package-def))
|
||||||
|
(descr (nth 2 pkgfile-info)))
|
||||||
|
(when (string-match "[\r\n]" descr)
|
||||||
|
(error "Illegal multi-line package description"))
|
||||||
(vector
|
(vector
|
||||||
(nth 0 pkgfile-info)
|
(nth 0 pkgfile-info)
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (elt)
|
(lambda (elt)
|
||||||
(list (car elt) (version-to-list (cadr elt))))
|
(list (car elt) (version-to-list (cadr elt))))
|
||||||
(eval (nth 3 pkgfile-info)))
|
(eval (nth 3 pkgfile-info)))
|
||||||
(nth 2 pkgfile-info)
|
descr
|
||||||
(nth 1 pkgfile-info)))
|
(nth 1 pkgfile-info)))
|
||||||
(error "No define-package found in %s" file-path)))))
|
(error "No define-package found in %s" file-path)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue