Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions despite requiring emacs >v24.4

From: Daniel Mendler <[email-masked]>
Date: Sat, 25 Jan 2025 08:02:35 +0100

Stefan Kangas <[email-masked]> writes:

> Daniel Mendler <[email-masked]> writes:
>
>> Stefan Kangas <[email-masked]> writes:
>>
>>> JD Smith <[email-masked]> writes:
>>>
>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>
>>>> ;; Version: 0.28
>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>> ;; Maintainer: [email-masked]
>>>
>>> Maybe this could be fixed in compat?
>>
>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>> of `(require 'treesit)`.
>
> Thanks.  Please let us know when this is implemented and which version
> of compat we should require.  Then we can also make the above change at
> the same time.

Yes, but it will take a while until compat-31 is released. We usually
release at the time of the branch creation of the corresponding Emacs
version (emacs-31). Until then, it is probably better to revert the
change in python.el.

Daniel