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: Daniel Mendler
Subject: bug#66554: [PATCH] Add the public API of Compat to the core
Date: Fri, 19 Jan 2024 07:52:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stefan Kangas <stefankangas@gmail.com>
>> Date: Thu, 18 Jan 2024 12:33:31 -0800
>> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, monnier@iro.umontreal.ca
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> +** New package Compat
>> >> +The Compat package on GNU ELPA provides forwards-compatibility
>> >> +support, so that packages that still provide support for older
>> >
>> > I think this is known as "backward compatibility".
>> 
>> AFAIU, backwards-compatibility is about making code written for Emacs 28
>> work without changes on Emacs 29 (N -> N+1).
>> 
>> But forwards-compatibility is about making code written for Emacs 29
>> work without changes on Emacs 28 (N -> N-1).
>> 
>> Compat is doing the latter.
>
> AFAIU, Compat allows Lisp programs written for newer Emacs version to
> work with older Emacs versions.  This makes those Lisp programs
> compatible with old versions of Emacs, and in my book this is
> backwards-compatibility.  But if I'm the only one who thinks that, so
> be it.

That's right. To formulate this differently, Compat allows Lisp programs
written for old Emacs versions to use newer Emacs features. This makes
Compat a forwards-compatibility library for the newer Emacs features.

The difference is what you consider the base line Emacs version. A
package could for example specify `Package-Requires: ((emacs "27.1")
(compat "29.1"))' in its package header. The header means that the
package was written for an old Emacs (27.1) but takes advantage of newer
features (29.1).

However one may also say that the package is actually for 29.1 and
was back-ported via Compat to 27.1. This could indeed have happened if
one looks at the history of the package.

Daniel





reply via email to

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