Subject: bug#17403: 24.4.50; package-alist doc-string error

From: Richard Kim <[email-masked]>
Date: Sun, 04 May 2014 18:42:18 -0700

I believe the doc-string for package-alist is incorrect.
Each element is (PKG DESCS) rather than (PKG . DESCS), i.e.,
each item is (list PKG DESCS) rather than (cons PKG DESCS).
To fix this, the patch shown below can be applied.

My assertion is confirmed by the following code from package.el:

    (defun package-process-define-package (exp origin)
       ...
            ;; If there's no old package, just add this to `package-alist'.
            (push (list name new-pkg-desc) package-alist)
       ...
       )

where the new item added to package-alist is a list of two items rather
than a cons of two items.

The git diff of the propose change follows next.

Changes from HEAD to working tree
1 file changed, 1 insertion(+), 1 deletion(-)
 lisp/emacs-lisp/package.el |    2 +-

	Modified   lisp/emacs-lisp/package.el
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7be0354..cbd4671 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -409,7 +409,7 @@ name (a symbol) and DESC is a `package--bi-desc' structure.")
 
 (defvar package-alist nil
   "Alist of all packages available for activation.
-Each element has the form (PKG . DESCS), where PKG is a package
+Each element has the form (PKG DESCS), where PKG is a package
 name (a symbol) and DESCS is a non-empty list of `package-desc' structure,
 sorted by decreasing versions.