Subject: Re: bug#16313: 24.3; package-delete does not update package-alist

From: Glenn Morris <[email-masked]>
Date: Tue, 07 Jan 2014 17:08:36 -0500

Bastien Guerry wrote:

> Still, package-delete did not cleanly delete the package from
> package-alist, only its description.

_Should_ it remove the entire entry? It's not obvious to me, given eg
the way package-installed-p works.

> I pushed a fix to cleanly remove the package occurrence.

-        (delete pkg-desc (assq name package-alist)))
+       (delete (delete pkg-desc (assq name package-alist)) package-alist))

That doesn't work for the first item in the list.
Why not the more obvious

(setq package-alist (delete (assq name package-alist) package-alist))