emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Yuan Fu
Subject: Re: Tree-sitter api
Date: Sun, 26 Sep 2021 21:42:36 -0700

Currently, because font-lock.el uses functions and variables defined in 
tree-sitter.el, it needs to require tree-sitter.el. Should we require 
tree-sitter.el by default? Then what do we do when tree-sitter is not available 
on the system? Should I wrap every reference to tree-sitter in font-lock.el 
with (when (featurep ’tree-sitter))? Or is there better ways to deal with this?

Another approach is to define everything tree-sitter related in tree-sitter.el, 
and make tree-sitter.el require font-lock.el instead of the other way around. 
Would that be better?

Yuan


reply via email to

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