Emacs now automagically depends on dev-libs/tree-sitter. The functionality seems to work well in Gentoo, fwiw, once the relevant grammars are installed for the modes one is interested in. It's awkward for me to link to the commit which added it because of the odd mix of merge commits back and forth, but the configure argument is --with-tree-sitter.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=721e48d625d4cf925165219270e28524b3d27352 commit 721e48d625d4cf925165219270e28524b3d27352 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-11-23 16:54:26 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-11-23 16:54:51 +0000 app-editors/emacs: Add tree-sitter USE flag Closes: https://bugs.gentoo.org/882567 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-29.0.9999.ebuild | 4 +++- app-editors/emacs/metadata.xml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-)