From 434fc2a22e4fd65fd63018e9373cbf56b51f8ab2 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 28 Oct 2022 16:38:37 -0700 Subject: Make Emacs compile without tree-sitter library * lisp/treesit.el: Add function declaration forms. * src/emacs.c: Always include syms_of_treesit. --- src/emacs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/emacs.c') diff --git a/src/emacs.c b/src/emacs.c index ba8b9c651a7..ed21cce1e25 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -136,9 +136,9 @@ extern char etext; #include #endif -#ifdef HAVE_TREE_SITTER +/* We don't guard this with HAVE_TREE_SITTER because treesit.o is + always compiled (to provide treesit-available-p). */ #include "treesit.h" -#endif #include "pdumper.h" #include "fingerprint.h" @@ -2269,10 +2269,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem #ifdef HAVE_MODULES syms_of_module (); #endif - -#ifdef HAVE_TREE_SITTER + /* We don't guard this with HAVE_TREE_SITTER because treesit.o + is always compiled (to provide treesit-available-p). */ syms_of_treesit (); -#endif #ifdef HAVE_SOUND syms_of_sound (); #endif -- cgit v1.2.1