bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#66554: [PATCH] Add the public API of Compat to the core


From: Stefan Monnier
Subject: bug#66554: [PATCH] Add the public API of Compat to the core
Date: Thu, 18 Jan 2024 15:18:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> +;;;; 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






reply via email to

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