[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nadvice compatibility in package list
From: |
Andy Moreton |
Subject: |
Re: nadvice compatibility in package list |
Date: |
Sat, 06 Jul 2019 15:35:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
On Fri 05 Jul 2019, Stefan Monnier wrote:
>> (assoc 'nadvice package--builtin-versions)
>> => (nadvice 1 0)
>
> This is right.
>
>> (assoc 'nadvice package--builtins)
>> => nil
>
> This is wrong.
>
> Thomas Fitzsimmons <address@hidden> writes:
>> diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
>> index 2278e389ce..ffecb24b1a 100644
>> --- a/lisp/emacs-lisp/nadvice.el
>> +++ b/lisp/emacs-lisp/nadvice.el
>> @@ -3,8 +3,11 @@
>> ;; Copyright (C) 2012-2019 Free Software Foundation, Inc.
>>
>> ;; Author: Stefan Monnier <address@hidden>
>> +;; Note: Always keep this built-in nadvice version greater than any
>> +;; nadvice version that has been or ever will be in GNU ELPA.
>> +;; Version: 10.0.0
>> ;; Keywords: extensions, lisp, tools
>> -;; Package: emacs
>> +;; Package: nadvice
>>
>> ;; This program is free software; you can redistribute it and/or modify
>> ;; it under the terms of the GNU General Public License as published by
>
> We already have defined its version as 1.0, so it would be better to
> keep it that way. I think the only thing that really matters is to
> remove the `Package: emacs` line (which is a line that explicitly
> *prevents* the file from being considered as a package in its own
> right).
The patch above works:
(assoc 'nadvice package--builtin-versions)
=> (nadvice 1 0)
(assoc 'nadvice package--builtins)
=> (nadvice . [(10 0 0) nil "Light-weight advice primitives for Elisp
functions"])
The `list-packages' output shows two nadvice packages:
nadvice 0.3 available gnu Forward
compatibility for Emacs-24.4's nadvice
nadvice 10.0.0 built-in Light-weight
advice primitives for Elisp functions
> So I think the patch below will do the trick as well.
> Can you confirm?
Stefan, your patch gives the right assoc lookups, but does not show the
builtin nadvice package in the output from `list-packages'.
In general, omitting the "Package:" directive is a little too subtle,
and future maintainers may add it back, assuming it was an unintended
omission rather than a deliberate change.
To test each patch I deleted lisp/finder-inf.el before rebuilding. Let
me know if this is insufficient for a correct rebuild.
AndyM