Commit f77d7d17 authored by Tom Willemse's avatar Tom Willemse Committed by Stefan Monnier

* lisp/emacs-lisp/package.el (package--prepare-dependencies): New function.

(package-buffer-info): Use it.

Fixes: debbugs:15108
parent aa2bddd7
2013-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
2013-12-14 Tom Willemse <tom@ryuslash.org> (tiny change)
* emacs-lisp/package.el (package--prepare-dependencies): New function.
(package-buffer-info): Use it (bug#15108).
* icomplete.el (icomplete-completions): Make sure the prefix is already
displayed elsewhere before hiding it.
......
......@@ -1104,6 +1104,23 @@ Otherwise return nil."
(declare-function lm-homepage "lisp-mnt" (&optional file))
(defun package--prepare-dependencies (deps)
"Turn DEPS into an acceptable list of dependencies.
Any parts missing a version string get a default version string
of \"0\" (meaning any version) and an appropriate level of lists
is wrapped around any parts requiring it."
(cond
((not (listp deps))
(error "Invalid requirement specifier: %S" deps))
(t (mapcar (lambda (dep)
(cond
((symbolp dep) `(,dep "0"))
((stringp dep)
(error "Invalid requirement specifier: %S" dep))
(t dep)))
deps))))
(defun package-buffer-info ()
"Return a `package-desc' describing the package in the current buffer.
......@@ -1135,7 +1152,9 @@ boundaries."
"Package lacks a \"Version\" or \"Package-Version\" header"))
(package-desc-from-define
file-name pkg-version desc
(if requires-str (package-read-from-string requires-str))
(if requires-str
(package--prepare-dependencies
(package-read-from-string requires-str)))
:kind 'single
:url homepage))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment