[Top][All Lists]

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

Re: Tree-sitter introduction documentation

From: Eli Zaretskii
Subject: Re: Tree-sitter introduction documentation
Date: Fri, 16 Dec 2022 19:21:12 +0200

> From: Perry Smith <pedz@easesoftware.com>
> Date: Fri, 16 Dec 2022 10:47:32 -0600
> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,
>  João Távora <joaotavora@gmail.com>,
>  emacs-devel <emacs-devel@gnu.org>
> Am I correct in assuming that the libtree-sitter library is conditionally
> loaded so Emacs could be built with tree-sitter and distributed but if
> the end user’s machine does not have libtree-sitter, Emacs will still
> load but (treesit-available-p) will return false?

That is correct for the language grammar libraries, but not for the
tree-sitter library itself.  Emacs can be built either with or without
the tree-sitter library, just like we do with libpng and other
optional image libraries.

If Emacs was build with the tree-sitter library, then it will attempt
to load the language grammar libraries (whcih are separate libraries)
dynamically when the corresponding language mode is activated.

reply via email to

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