[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master b689b90: Package archives now have priorities.

From: Jorgen Schäfer
Subject: Re: [Emacs-diffs] master b689b90: Package archives now have priorities.
Date: Sat, 17 Jan 2015 12:02:17 +0100

On Sat, Jan 17, 2015 at 12:48 AM, Artur Malabarba
<address@hidden> wrote:
>> +(defcustom package-archive-priorities nil
>> +  "An alist of priorities for packages.
>> +
>> +Each element has the form (ARCHIVE-ID . PRIORITY).
>> +
>> +When installing packages, the package with the highest version
>> +number from the archive with the highest priority is
>> +selected. When higher versions are available from archives with
>> +lower priorities, the user has to select those manually.
>> +
>> +Archives not in this list have the priority 0."
>> +  :type 'integer
> I think you meant 'alist?

Indeed, thanks for catching this. Fixed in d80fed.

>> +(defun package--add-to-alist (pkg-desc alist)
>> +  "Add PKG-DESC to ALIST.
>> +
>> +Packages are grouped by name. The package descriptions are sorted
>> +by version number."
>> +  (let* ((name (package-desc-name pkg-desc))
>> +         (priority-version (package-desc-priority-version pkg-desc))
>> +         (existing-packages (assq name alist)))
>> +    (if (not existing-packages)
>> +        (cons (list name pkg-desc)
> This list should be a cons, probably why the test is failing.

Why should this be a cons? The alist maps package names to ordered
package descriptors – I guess (cons name (list pkg-desc)) would be
clearer in intent.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]