Subject: Re: bug#69528: 30.0.50; [BUG] transient.el is not a member of package--builtin-versions

From: Philip Kaludercic <[email-masked]>
Date: Sat, 25 May 2024 08:47:36 +0000

Joseph Turner <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>
>> Joseph Turner <[email-masked]> writes:
>>
>>> Philip Kaludercic <[email-masked]> writes:
>>>> So in general, this patch might be appropriate?
>>>>
>>>> diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
>>>> index 581053f6304..42f386933dc 100644
>>>> --- a/lisp/emacs-lisp/loaddefs-gen.el
>>>> +++ b/lisp/emacs-lisp/loaddefs-gen.el
>>>> @@ -433,7 +433,8 @@ loaddefs-generate--parse-file
>>>>            ;; loaddefs for packages so that `syntax-ppss' later gives
>>>>            ;; correct results.
>>>>            (emacs-lisp-mode)
>>>> -        (let ((version (lm-header "version"))
>>>> +        (let ((version (or (lm-header "package-version")
>>>> +                           (lm-header "version")))
>>>>                package)
>>>>            (when (and version
>>>>                       (setq version (ignore-errors (version-to-list version)))
>>>>
>>>>
>>>
>>> What about making `lm-version' handle the "package-version" header then
>>> using `lm-version' in loaddefs-generate--parse-file?  See patches.
>>
>> My main concern was if we want to have Package-Version always override
>> Version, but if my patch modified loaddefs-gen, then I don't think there
>> is much of a difference if we change lisp-mnt instead (in terms of the
>> generality of the change).
>
> If it would be more appropriate, I can resubmit another patch with
> "Version" used preferentially over "Package-Version".

No, I believe that would be wrong, at least going by these quotes from
the manual:

(elisp) Simple Packages:

     The version number comes from the ‘Package-Version’ header, if it
  exists, or from the ‘Version’ header otherwise.  One or the other _must_
  be present.  Here, the version number is 1.3.

(elisp) Library Headers:

  ‘Package-Version’
       If ‘Version’ is not suitable for use by the package manager, then a
       package can define ‘Package-Version’; it will be used instead.
       This is handy if ‘Version’ is an RCS id or something else that
       cannot be parsed by ‘version-to-list’.

So the patch is fine as it is.

-- 
	Philip Kaludercic on peregrine