]> git.eshelyaron.com Git - emacs.git/commitdiff
; Repair build without tree-sitter
authorMattias Engdegård <mattiase@acm.org>
Mon, 21 Nov 2022 14:41:28 +0000 (15:41 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 21 Nov 2022 14:41:28 +0000 (15:41 +0100)
src/treesit.c
src/treesit.h

index 599a9b883ef8decd209d948b65578f147e4108d5..07d78626e6b32ccdd5bb687480d7ab0f20acc538 100644 (file)
@@ -21,10 +21,10 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "buffer.h"
 
-#if HAVE_TREE_SITTER
-
 #include "treesit.h"
 
+#if HAVE_TREE_SITTER
+
 \f
 /* Dynamic loading of libtree-sitter.  */
 
index 2d2a91cd3665afa28b56b65066cae524b69a2bbd..1473126c5bcf68f731a693eba2e10ce94801f46b 100644 (file)
@@ -20,6 +20,10 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #ifndef EMACS_TREESIT_H
 #define EMACS_TREESIT_H
 
+#include <config.h>
+
+#ifdef HAVE_TREE_SITTER
+
 #include <tree_sitter/api.h>
 #include "lisp.h"
 
@@ -176,6 +180,8 @@ CHECK_TS_COMPILED_QUERY (Lisp_Object query)
              Qtreesit_compiled_query_p, query);
 }
 
+INLINE_HEADER_END
+
 extern void treesit_record_change (ptrdiff_t, ptrdiff_t, ptrdiff_t);
 extern Lisp_Object make_treesit_parser (Lisp_Object, TSParser *, TSTree *,
                                        Lisp_Object);
@@ -187,8 +193,8 @@ extern void treesit_delete_parser (struct Lisp_TS_Parser *);
 extern void treesit_delete_query (struct Lisp_TS_Query *);
 extern bool treesit_named_node_p (TSNode);
 
-extern void syms_of_treesit (void);
+#endif /* HAVE_TREE_SITTER */
 
-INLINE_HEADER_END
+extern void syms_of_treesit (void);
 
 #endif /* EMACS_TREESIT_H */