Subject: Re: bug#13824: 24.3.50; :package-version not taking priority over :version

From: Bill Wohler <[email-masked]>
Date: Sat, 10 Aug 2019 15:40:40 -0700

Bill Wohler <[email-masked]> wrote:

> Eli Zaretskii <[email-masked]> wrote:
> 
> > > From: Stefan Kangas <[email-masked]>
> > > Date: Thu, 8 Aug 2019 05:59:21 +0200
> > > Cc: [email-masked]
> > > 
> > > Bastien Guerry <[email-masked]> writes:
> > > 
> > > > The docstring of `defcustom' says:
> > > >
> > > > :package-version
> > > >         VALUE should be a list with the form (PACKAGE . VERSION)
> > > >         specifying that the variable was first introduced, or its
> > > >         default value was changed, in PACKAGE version VERSION.  This
> > > >         keyword takes priority over :version.
> > > >         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > >
> > > > but `describe-variable-custom-version-info' gives priority to :version
> > > > over :package-version.  Which one is correct here?
> > > 
> > > This is still an issue on current master (and 26.2).
> > > 
> > > I reproduced this using:
> > > 
> > >     (progn
> > >       (defcustom foobar nil
> > >         "foo"
> > >         :version "27.1"
> > >         :package-version '(foo . "1"))
> > >       (describe-variable-custom-version-info 'foobar))
> > > 
> > > Which results in:
> > > 
> > >     "This variable was introduced, or its default value was changed, in
> > >     version 27.1 of Emacs.
> > >     "
> > > 
> > > But C-h f defcustom says:
> > > 
> > >     :package-version
> > >             VALUE should be a list with the form (PACKAGE . VERSION)
> > >             specifying that the variable was first introduced, or its
> > >             default value was changed, in PACKAGE version VERSION.  This
> > >             keyword takes priority over :version.
> > 
> > The implementation only prefers :package-version for the purposes of
> > customize-changed-options, i.e. the Options->Customize Emacs->New
> > Options menu item.  By contrast, describe-variable-custom-version-info
> > is used for displaying the doc strings of options.  For a package that
> > is bundled with Emacs, I think displaying :version in "C-h v" makes
> > sense.  If people agree, then this is a minor documentation bug (also
> > to be fixed in the ELisp manual), not a code bug.
> > 
> > Bill, what is your take on this?  Your change, which introduced this
> > attribute, only modified customize-changed-options.  Was that on
> > purpose?
> 
> Thanks for asking. The original intent of package-version was to provide
> more accurate version information in packages that were updated more
> often than Emacs, regardless of whether they were packaged in Emacs
> (like MH-E and Gnus) or not. I think that should apply to any function
> that displays version information for an option. That is, any function
> that looks for :version should also look for :package-version.

And to answer your question directly, if I didn't change other
functions, it was not on purpose.

By the way, I just checked and describe-variable-custom-version-info,
which was added in 2007, did not yet exist when I added :package-version
in 2006.

-- 
Bill Wohler <[email-masked]> aka <[email-masked]>
http://www.newt.com/wohler/, GnuPG ID:610BD9AD