GNU bug report logs -
#75526
python.el uses treesit-declare-unavailable-functions despite requiring emacs >v24.4
Previous Next
Reported by: JD Smith <jdtsmith <at> gmail.com>
Date: Sun, 12 Jan 2025 21:47:02 UTC
Severity: normal
Fixed in version 31.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> 4. More complicated to resolve perhaps are these symbols from Emacs 29.1:
>>
>> 29.1 treesit [require]
>> 29.1 treesit-buffer-root-node
>> 29.1 treesit-defun-name
>> 29.1 treesit-filter-child
>> 29.1 treesit-font-lock-rules
>> 29.1 treesit-fontify-with-override
>> 29.1 treesit-induce-sparse-tree
>> 29.1 treesit-major-mode-setup
>> 29.1 treesit-node-at
>> 29.1 treesit-node-child-by-field-name
>> 29.1 treesit-node-children
>> 29.1 treesit-node-end
>> 29.1 treesit-node-field-name
>> 29.1 treesit-node-parent
>> 29.1 treesit-node-prev-sibling
>> 29.1 treesit-node-start
>> 29.1 treesit-node-text
>> 29.1 treesit-node-type
>> 29.1 treesit-parser-create
>> 29.1 treesit-ready-p
>>
>> Yuan, Philip, Daniel, any ideas for how to handle this compatibility
>> issue?
>
> I still haven't familiarised myself with the treesit API, and I don't
> know if there is a reasonable way to translate these into fontlock...
We definitely don't want to translate those into fontlock.
AFAIK, there are just two ways to solve this:
- Bump package-requires to Emacs-29.
- Use (require 'treesit nil t) and than sprinkle enough `fboundp` tests
around treesitter code to allow loading `python.el` into Emacs<29.
It's perfectly OK if `python-ts-mode` doesn't work in Emacs<29.
Bumping package-requires to 29 might not be a bad idea since noone
complained (until now) in the 2½ years since we added (require 'treesit)
to the code.
Stefan
This bug report was last modified 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.