From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Tue, 10 Sep 2024 22:09:04 -0700 Message-ID: <904ED5D6-11A2-4B54-A60C-F972AF3E91B4@gmail.com> References: <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <868qwjjhq3.fsf@gnu.org> <78DD1528-A12B-4199-9822-157852080027@gmail.com> <86wmk2i2vp.fsf@gnu.org> <29FFAE70-8B01-47CF-A45A-D01C82C56247@gmail.com> <86wmk0hlnr.fsf@gnu.org> <86y14fg95n.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23029"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 11 07:11:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1soFdR-0005oQ-Su for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Sep 2024 07:11:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soFd5-0007cd-RP; Wed, 11 Sep 2024 01:11:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1soFd4-0007cC-6I for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 01:10:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soFd3-0002zM-Pk for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 01:10:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:Date:Mime-Version:From:To:Subject; bh=EtP3Uf+MHOf5nC3EfMfcjkV/2YRqHxBxf47YHDVpe/w=; b=SPP25Ka8hHusUR5iuBvPzpLf6kDOSn0qGEfW0MC/pRGfedfR23NJefBOXIF5IkQDT8YbJYRMQwfQKNg27uNRSgk/DzgKJVezO25msVdAv4t00RVaALMznoQsc3VXGlZiAmEHR8ZvTvBfP7G8krNTVZS9MPfw11aCVTdeuGZgdRQT5otbmI0RjbXX2cKOcxKLAXjAWMNVoXm66ae+T/6NBQC0ClHTARKiWoFu8qSaVXD4IZ1tMXQuqSWn1rR0SSZI6/lAP0qR4qBofvCucdd5rTX6f653KHcsHQd+dXSkPYq9zxCC0rB5TDZHpwSnyGwBcZzDQeWQ0P2t6A98Oo4PhQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soFd8-00029g-Cf for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 01:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2024 05:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64830 X-GNU-PR-Package: emacs Original-Received: via spool by 64830-submit@debbugs.gnu.org id=B64830.17260314318245 (code B ref 64830); Wed, 11 Sep 2024 05:11:02 +0000 Original-Received: (at 64830) by debbugs.gnu.org; 11 Sep 2024 05:10:31 +0000 Original-Received: from localhost ([127.0.0.1]:37505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFcc-00028v-Tj for submit@debbugs.gnu.org; Wed, 11 Sep 2024 01:10:31 -0400 Original-Received: from mail-pf1-f169.google.com ([209.85.210.169]:42009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFca-00028g-3h for 64830@debbugs.gnu.org; Wed, 11 Sep 2024 01:10:29 -0400 Original-Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71798661a52so390028b3a.0 for <64830@debbugs.gnu.org>; Tue, 10 Sep 2024 22:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726031356; x=1726636156; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=EtP3Uf+MHOf5nC3EfMfcjkV/2YRqHxBxf47YHDVpe/w=; b=KjB+pgkQR7IZJQTrJ6awi/MnvHHXk98e8JlcOfec4Hdj/J5fqds0tuFvItfkMQk9Ud rwJ/dLg31imQ6U2UTGdBI3Xh5s7ycNJdeOqLzA9gR90Rrwgfz0hS7ZTliAz8Kgy12lVp CWydqi7tHiA4FzY+AorJaumouNPogmgEHTj/C/+T+/qZQ5sctR4nt2+RfV6Bnc3ThQXg nwFjoaNlHZ9cf4jiSeI5l+2TcPGeLQOhOEOgYFgD0KYHXvZqFA5UnlOJr/lbkvaIXLEw 6SYbEVr1PtO7TxYoqPN2JqlJGWjwZhxM7oDG4xPR/vX1bOutfyUWHDo+8s3aR+lEkV9k RVng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726031356; x=1726636156; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EtP3Uf+MHOf5nC3EfMfcjkV/2YRqHxBxf47YHDVpe/w=; b=LAwncp2Zue0eWlKylcYzr/JYAEDa5tnHPc7ld+Nr4uOp4W55ewgYSHqPyirct+sLmh tqwgLDEhSJkPe1+eyQammZjtsBWXEpigIBekhOVwB50p/aVw4Z5dVytj2D0jkIEYtFcW g5z0iHVVrW3pLeLwurHp8YlrHggxix41MLNU6txuwxORMNr5SSLsxwZ8CSP+LXjR3B7O A4kGjvoMWhrJ+ouptDduDX/zySoisoaN1y5VvexgemohBf7APv8sEaYc2Dktbl0Q/et1 kiNIhi2RWqylk6gyq3JG2b+DUeFQqJtAm06bmWYJXfPgWiHts1fHNR0n3+1GqC71RYYm XqBQ== X-Forwarded-Encrypted: i=1; AJvYcCVxk3/mZodyaludaCmXPeqJxdNld8B5WQEgNRIhWM4Cgo/Zc/o2CrOcyiW0ccThFr0qefqSdg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwukCiVQII+KVfEOIVgcApQIBmtFwCgMdgpe5XHLC/HyhY1K3ox ihTGW1ty3DH9Qgnw4RR7v4icA4daiq8Q7lDpKP5ScBhu3AAP4cSe X-Google-Smtp-Source: AGHT+IFdRw71tiPinloXObNZ9UfSB6eQuZmhsEkRI/nrFXmzTgFURpOCg77gG9TApoE6fabNUsH7RQ== X-Received: by 2002:aa7:8e46:0:b0:717:864a:8b0a with SMTP id d2e1a72fcca58-71907eccf82mr8934628b3a.7.1726031356185; Tue, 10 Sep 2024 22:09:16 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:a1a8:5602:237b:300d]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-719090d1274sm2156272b3a.218.2024.09.10.22.09.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Sep 2024 22:09:15 -0700 (PDT) In-Reply-To: <86y14fg95n.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291587 Archived-At: --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Finally able to address this again. > On Aug 28, 2024, at 11:01=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Wed, 28 Aug 2024 21:54:26 -0700 >> Cc: Stefan Kangas , >> Alan Mackenzie , >> 64830@debbugs.gnu.org >>=20 >> Ah, thanks for the review! TIL. Here=E2=80=99s the revised patch. >=20 > A few more nits: >=20 >> + const char *sym; >> + dynlib_addr((void (*) (void)) langfn, &loaded_lang.filename, = &sym); > ^^ > We leave one space between the function name and the opening paren. > Also, do you really need the type-cast for langfn? Do you get > compiler warnings if you remove the cast? Oops. And yeah, I actually get an error: treesit.c:702:16: error: incompatible function pointer types passing = 'TSLanguage *(*)(void)' (aka 'struct TSLanguage *(*)(void)') to = parameter of type 'void (*)(void)' = [-Wincompatible-function-pointer-types] 702 | dynlib_addr (langfn, &loaded_lang.filename, &sym); | ^~~~~~ ./dynlib.h:39:26: note: passing argument to parameter 'ptr' here 39 | void dynlib_addr (void (*ptr) (void), const char **file, const = char **sym); | ^ The error seems reasonable to me, I just don=E2=80=99t know other way to = suppress it. >> +DEFUN ("treesit-grammar-location", Ftreesit_grammar_location, >> + Streesit_grammar_location, >> + 1, 1, 0, >> + doc: /* Return the path to the grammar file for LANGUAGE. > ^^^^ > "Path" again. I suggest "absolute file name" instead. >=20 >> +If LANGUAGE isn't loaded yet, load it first. If the langauge can't = be >> +loaded or the path couldn't be found, return nil. */) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I suggest "or the file name couldn't be determined=E2=80=9D. Done. Please take a look at the latest patch, thanks! Yuan --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Disposition: attachment; filename=grammar-location.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="grammar-location.patch" Content-Transfer-Encoding: quoted-printable =46rom=205158271bf6ef6d6c28d88fe21acd85169e10e93b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Tue,=20= 27=20Aug=202024=2022:31:42=20-0700=0ASubject:=20[PATCH]=20Add=20= Ftreesit_grammar_location=0A=0A*=20src/treesit.c=20= (treesit_loaded_lang):=20New=20struct.=0A(treesit_load_language):=20= Return=20a=20struct=20instead=20of=20just=20the=20language=0Aobject.=20=20= The=20struct=20contains=20both=20the=20language=20object=20and=20the=20= path=20to=0Athe=20shared=20library.=0A(Ftreesit_language_available_p,=20= Ftreesit_language_abi_version)=0A(treesit_ensure_query_compiled,=20= Ftreesit_parser_create):=20Update=0Acall=20of=20treesit_load_language.=0A= (Ftreesit_grammar_location):=20New=20function.=0A---=0A=20src/treesit.c=20= |=2068=20+++++++++++++++++++++++++++++++++++++++++----------=0A=201=20= file=20changed,=2055=20insertions(+),=2013=20deletions(-)=0A=0Adiff=20= --git=20a/src/treesit.c=20b/src/treesit.c=0Aindex=20= 5aedca44489..f2adf92d8c6=20100644=0A---=20a/src/treesit.c=0A+++=20= b/src/treesit.c=0A@@=20-22,6=20+22,7=20@@=20Copyright=20(C)=202021-2024=20= Free=20Software=20Foundation,=20Inc.=0A=20#include=20=0A=20= #include=20"lisp.h"=0A=20#include=20"buffer.h"=0A+#include=20"coding.h"=0A= =20=0A=20#include=20"treesit.h"=0A=20=0A@@=20-491,6=20+492,14=20@@=20= treesit_initialize=20(void)=0A=20=0C=0A=20/***=20Loading=20language=20= library=20=20*/=0A=20=0A+struct=20treesit_loaded_lang=0A+{=0A+=20=20/*=20= The=20language=20object.=20=20*/=0A+=20=20TSLanguage=20*lang;=0A+=20=20= /*=20The=20path=20to=20the=20shared=20library.=20=20*/=0A+=20=20const=20= char=20*filename;=0A+};=0A+=0A=20/*=20Translate=20a=20symbol=20= treesit-=20to=20a=20C=20name=20treesit_.=20=20*/=0A=20static=20= void=0A=20treesit_symbol_to_c_name=20(char=20*symbol_name)=0A@@=20-575,7=20= +584,7=20@@=20treesit_load_language_push_for_each_suffix=20(Lisp_Object=20= lib_base_name,=0A=20=0A=20=20=20=20If=20error=20occurs,=20return=20NULL=20= and=20fill=20SIGNAL_SYMBOL=20and=20SIGNAL_DATA=0A=20=20=20=20with=20= values=20suitable=20for=20xsignal.=20=20*/=0A-static=20TSLanguage=20*=0A= +static=20struct=20treesit_loaded_lang=0A=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=09=09=20=20=20=20=20=20=20= Lisp_Object=20*signal_symbol,=20Lisp_Object=20*signal_data)=0A=20{=0A@@=20= -626,6=20+635,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20dynlib_handle_ptr=20handle;=0A=20=20=20const=20= char=20*error;=0A=20=20=20Lisp_Object=20error_list=20=3D=20Qnil;=0A+=20=20= struct=20treesit_loaded_lang=20loaded_lang=20=3D=20{=20NULL,=20NULL=20};=0A= =20=0A=20=20=20tail=20=3D=20path_candidates;=0A=20=20=20error=20=3D=20= NULL;=0A@@=20-650,7=20+660,7=20@@=20treesit_load_language=20(Lisp_Object=20= language_symbol,=0A=20=20=20=20=20=20=20=20=20=20mismatch.=20=20*/=0A=20=20= =20=20=20=20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20= =20=20=20=20=20=20*signal_data=20=3D=20Fcons=20(Qnot_found,=20Fnreverse=20= (error_list));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=0A=20=20=20/*=20Load=20= TSLanguage.=20=20*/=0A@@=20-672,7=20+682,7=20@@=20treesit_load_language=20= (Lisp_Object=20language_symbol,=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= *signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20=20=20= =20*signal_data=20=3D=20list2=20(Qsymbol_error,=20build_string=20= (error));=0A-=20=20=20=20=20=20return=20NULL;=0A+=20=20=20=20=20=20= return=20loaded_lang;=0A=20=20=20=20=20}=0A=20=20=20TSLanguage=20*lang=20= =3D=20(*langfn)=20();=0A=20=0A@@=20-685,9=20+695,14=20@@=20= treesit_load_language=20(Lisp_Object=20language_symbol,=0A=20=20=20=20=20= =20=20*signal_symbol=20=3D=20Qtreesit_load_language_error;=0A=20=20=20=20= =20=20=20*signal_data=20=3D=20list2=20(Qversion_mismatch,=0A=20=09=09=09=20= =20=20=20make_fixnum=20(ts_language_version=20(lang)));=0A-=20=20=20=20=20= =20return=20NULL;=0A+=20=20=20=20=20=20return=20loaded_lang;=0A=20=20=20=20= =20}=0A-=20=20return=20lang;=0A+=0A+=20=20const=20char=20*sym;=0A+=20=20= dynlib_addr=20((void=20(*)=20void)=20langfn,=20&loaded_lang.filename,=20= &sym);=0A+=0A+=20=20loaded_lang.lang=20=3D=20lang;=0A+=20=20return=20= loaded_lang;=0A=20}=0A=20=0A=20DEFUN=20("treesit-language-available-p",=20= Ftreesit_language_available_p,=0A@@=20-704,7=20+719,9=20@@=20DEFUN=20= ("treesit-language-available-p",=20Ftreesit_language_available_p,=0A=20=20= =20treesit_initialize=20();=0A=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20=20if=20= (treesit_load_language=20(language,=20&signal_symbol,=20&signal_data)=20= =3D=3D=20NULL)=0A+=20=20struct=20treesit_loaded_lang=20loaded_lang=0A+=20= =20=20=20=3D=20treesit_load_language=20(language,=20&signal_symbol,=20= &signal_data);=0A+=20=20if=20(loaded_lang.lang=20=3D=3D=20NULL)=0A=20=20=20= =20=20{=0A=20=20=20=20=20=20=20if=20(NILP=20(detail))=0A=20=09return=20= Qnil;=0A@@=20-750,9=20+767,9=20@@=20DEFUN=20= ("treesit-language-abi-version",=20Ftreesit_language_abi_version,=0A=20=20= =20=20=20{=0A=20=20=20=20=20=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A=20=20=20=20=20=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A-=20= =20=20=20=20=20TSLanguage=20*ts_language=20=3D=20treesit_load_language=20= (language,=0A-=09=09=09=09=09=09=20=20=20=20=20=20=20&signal_symbol,=0A-=09= =09=09=09=09=09=20=20=20=20=20=20=20&signal_data);=0A+=20=20=20=20=20=20= struct=20treesit_loaded_lang=20lang=0A+=09=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=20=20=20=20=20=20= TSLanguage=20*ts_language=20=3D=20lang.lang;=0A=20=20=20=20=20=20=20if=20= (ts_language=20=3D=3D=20NULL)=0A=20=09return=20Qnil;=0A=20=20=20=20=20=20= =20uint32_t=20version=20=3D=20=20ts_language_version=20(ts_language);=0A= @@=20-760,6=20+777,28=20@@=20DEFUN=20("treesit-language-abi-version",=20= Ftreesit_language_abi_version,=0A=20=20=20=20=20}=0A=20}=0A=20=0A+DEFUN=20= ("treesit-grammar-location",=20Ftreesit_grammar_location,=0A+=20=20=20=20= =20=20=20Streesit_grammar_location,=0A+=20=20=20=20=20=20=201,=201,=200,=0A= +=20=20=20=20=20=20=20doc:=20/*=20Return=20the=20absolute=20file=20name=20= of=20the=20grammar=20file=20for=20LANGUAGE.=0A+=0A+If=20LANGUAGE=20isn't=20= loaded=20yet,=20load=20it=20first.=20=20If=20the=20langauge=20can't=20be=0A= +loaded=20or=20the=20file=20name=20couldn't=20be=20determined,=20return=20= nil.=20=20*/)=0A+=20=20(Lisp_Object=20language)=0A+{=0A+=20=20= CHECK_SYMBOL=20(language);=0A+=0A+=20=20Lisp_Object=20signal_symbol=20=3D=20= Qnil;=0A+=20=20Lisp_Object=20signal_data=20=3D=20Qnil;=0A+=20=20struct=20= treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20treesit_load_language=20= (language,=20&signal_symbol,=20&signal_data);=0A+=0A+=20=20if=20= (!lang.lang=20||=20!lang.filename)=20return=20Qnil;=0A+=0A+=20=20return=20= DECODE_FILE=20(make_unibyte_string=20(lang.filename,=0A+=09=09=09=09=09=20= =20=20strlen=20(lang.filename)));=0A+}=0A+=0A=20=0C=0A=20/***=20Parsing=20= functions=20=20*/=0A=20=0A@@=20-1305,8=20+1344,9=20@@=20= treesit_ensure_query_compiled=20(Lisp_Object=20query,=20Lisp_Object=20= *signal_symbol,=0A=20=20=20Lisp_Object=20language=20=3D=20= XTS_COMPILED_QUERY=20(query)->language;=0A=20=20=20/*=20This=20is=20the=20= main=20reason=20why=20we=20compile=20query=20lazily:=20to=20avoid=0A=20=20= =20=20=20=20loading=20languages=20early.=20=20*/=0A-=20=20TSLanguage=20= *treesit_lang=20=3D=20treesit_load_language=20(language,=20= signal_symbol,=0A-=09=09=09=09=09=09=20=20=20=20signal_data);=0A+=20=20= struct=20treesit_loaded_lang=20lang=0A+=20=20=20=20=3D=20= treesit_load_language=20(language,=20signal_symbol,=20signal_data);=0A+=20= =20TSLanguage=20*treesit_lang=20=3D=20lang.lang;=0A=20=20=20if=20= (treesit_lang=20=3D=3D=20NULL)=0A=20=20=20=20=20return=20NULL;=0A=20=0A= @@=20-1477,8=20+1517,9=20@@=20DEFUN=20("treesit-parser-create",=0A=20=20=20= Lisp_Object=20signal_symbol=20=3D=20Qnil;=0A=20=20=20Lisp_Object=20= signal_data=20=3D=20Qnil;=0A=20=20=20TSParser=20*parser=20=3D=20= ts_parser_new=20();=0A-=20=20TSLanguage=20*lang=20=3D=20= treesit_load_language=20(language,=20&signal_symbol,=0A-=09=09=09=09=09=20= =20=20=20&signal_data);=0A+=20=20struct=20treesit_loaded_lang=20= loaded_lang=0A+=20=20=20=20=3D=20treesit_load_language=20(language,=20= &signal_symbol,=20&signal_data);=0A+=20=20TSLanguage=20*lang=20=3D=20= loaded_lang.lang;=0A=20=20=20if=20(lang=20=3D=3D=20NULL)=0A=20=20=20=20=20= xsignal=20(signal_symbol,=20signal_data);=0A=20=20=20/*=20We=20check=20= language=20version=20when=20loading=20a=20language,=20so=20this=20should=0A= @@=20-4275,6=20+4316,7=20@@=20cons=20(REGEXP=20.=20FN),=20which=20is=20a=20= combination=20of=20a=20regexp=20and=20a=20predicate=0A=20=20=20defsubr=20= (&Streesit_language_available_p);=0A=20=20=20defsubr=20= (&Streesit_library_abi_version);=0A=20=20=20defsubr=20= (&Streesit_language_abi_version);=0A+=20=20defsubr=20= (&Streesit_grammar_location);=0A=20=0A=20=20=20defsubr=20= (&Streesit_parser_p);=0A=20=20=20defsubr=20(&Streesit_node_p);=0A--=20=0A= 2.39.5=20(Apple=20Git-151)=0A=0A= --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_2246CF53-64D1-4824-AF51-8FBED265D41C--