emacs-diffs
[Top][All Lists]
Advanced

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

feature/tree-sitter 87c696b7a8: ; Repair build without tree-sitter


From: Mattias Engdegård
Subject: feature/tree-sitter 87c696b7a8: ; Repair build without tree-sitter
Date: Mon, 21 Nov 2022 09:42:19 -0500 (EST)

branch: feature/tree-sitter
commit 87c696b7a8db5ba1e43c9c52d7e0c1367e347eb6
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    ; Repair build without tree-sitter
---
 src/treesit.c |  4 ++--
 src/treesit.h | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/treesit.c b/src/treesit.c
index 599a9b883e..07d78626e6 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -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
+
 
 /* Dynamic loading of libtree-sitter.  */
 
diff --git a/src/treesit.h b/src/treesit.h
index 2d2a91cd36..1473126c5b 100644
--- a/src/treesit.h
+++ b/src/treesit.h
@@ -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 */



reply via email to

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