GNU bug report logs - #66554
[PATCH] Add the public API of Compat to the core

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Sun, 15 Oct 2023 09:37:01 UTC

Severity: wishlist

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, Eli Zaretskii <eliz <at> gnu.org>, stefankangas <at> gmail.com, 66554 <at> debbugs.gnu.org
Subject: bug#66554: [PATCH] Add the public API of Compat to the core
Date: Thu, 18 Jan 2024 15:18:42 -0500
> +;;;; Hack to avoid installing Compat if not necessary
> +
> +;; The versioning scheme of the Compat package follows that of Emacs,
> +;; to indicate what version of Emacs is being supported.  For example,
> +;; the Compat version number 29.2.3.9 would attempt to provide
> +;; compatibility definitions up to Emacs 29.2, while also designating
> +;; that this is the third major release and ninth minor release of
> +;; Compat, for the specific Emacs release.
> +
> +;; To ensure that if the user is using Emacs X.Y installed, the ELPA
> +;; package Compat X.Y.Z* (for any values of Z*) does not get
> +;; unnecessarily installed, as there are no missing features that
> +;; Compat could provide, we programmatically specify the version of
> +;; the package to be that of the current Emacs version plus a high
> +;; "major release" to exceed the major version of Compat.
> +
> +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions)

Hack?  Why call it a hack?

By definition a `compat-NN.MM` package is attempting to provide a subset
of the API offered by Emacs-NN.MM, so Emacs-NN.MM very much provides
a version of `compat-NN.MM`.
IOW

    (push (list 'compat emacs-major-version emacs-minor-version ...)
          package--builtin-versions)

is not a hack at all.

If you want to label the `most-positive-fixnum` as a hack, I guess
that's OK but then the comment should clarify what it's referring to.

Also, please keep the line below the 80 columns limit, e.g.:

    ;;;###autoload (push (list 'compat emacs-major-version
    ;;;###autoload              emacs-minor-version most-positive-fixnum)
    ;;;###autoload       package--builtin-versions)


-- Stefan





This bug report was last modified 1 year and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.