emacs-devel
[Top][All Lists]
Advanced

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

Re: Dealing with obsoletion warnings in non-core code


From: Vasilij Schneidermann
Subject: Re: Dealing with obsoletion warnings in non-core code
Date: Mon, 28 Sep 2020 20:34:57 +0200

> What about something like the below?
> 
>   (if (> emacs-major-version NN)
>     (defun recommended-function (...)
>       ...))

You don't want a third-party package defining a potentially
non-conformant version of future built-in functionality (for example if
they take the definition from a specific Emacs version and it changes in
another one).  Users could mistake that for the real one.  Shimming may
be acceptable in a JavaScript world, but remember, they have invented
fixes to lack of namespacing and modules and we haven't, so their damage
from a package is global.

Besides, isn't the logic the wrong way around?  The recommended function
is something available in a newer Emacs version, so you'd test for an
older one and if the check is positive, define the shim.  Assuming you
can even, some functionality cannot be backported that easily.

Attachment: signature.asc
Description: PGP signature


reply via email to

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