From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Thu, 29 Aug 2024 09:01:08 +0300 Message-ID: <86y14fg95n.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14516"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64830@debbugs.gnu.org, acm@muc.de, stefankangas@gmail.com To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 29 08:02:28 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 1sjYEl-0003c1-OB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Aug 2024 08:02:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjYES-00035X-CH; Thu, 29 Aug 2024 02:02:08 -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 1sjYER-00035P-Gr for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 02:02:07 -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 1sjYER-0008L2-8E for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 02:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=l7oRBmOZgpHuYIWzdwaYsF2HRTSkzkqNGNhb5lMBzhg=; b=JEQ6e4QNgBd1s8jmOeqB0ngc+Jxb2jGZrXHHHo793PRkHJTwoVusq6RMurwSOOy4w6634yYPIKuMshCTT3mGqyuK0YCkGcyJfolTm3Eoz7Kv/TzdyUjrRLKhhdmiQLvAknCfPTyNt5D2R7EHwc1582A8S4GSCtXjkL1wPhfr7iJS81Raq+705bdow9iweD3nv7Ne1/TBLeTc12uMZ3is416JQ5VyrJKhktQ8RdS66aB9XlT4YRK7yWSui5l98bADf2HSSyAoORZVwnBIUgdARwsKHB8cCGGgTYIrgEY6Nk0C/9ZtAAXIyCTV5sTfNXZxaupSZP3Dz5QBQtGSOdmlQQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjYFK-0002ou-5v for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 02:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2024 06:03: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.172491133610772 (code B ref 64830); Thu, 29 Aug 2024 06:03:02 +0000 Original-Received: (at 64830) by debbugs.gnu.org; 29 Aug 2024 06:02:16 +0000 Original-Received: from localhost ([127.0.0.1]:50128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjYEZ-0002ng-MF for submit@debbugs.gnu.org; Thu, 29 Aug 2024 02:02:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjYEY-0002nU-Ed for 64830@debbugs.gnu.org; Thu, 29 Aug 2024 02:02:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjYDZ-0008Ii-8y; Thu, 29 Aug 2024 02:01:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=l7oRBmOZgpHuYIWzdwaYsF2HRTSkzkqNGNhb5lMBzhg=; b=IyP3NE0x5GHyRhr2ZjSK eEJS5T/w5svot1TobgUraRJFkxdIAe406715Gqd3qqOmldFbOFDj3sRaf4o+H/2i8fWP9DJEmJVof 2xAfB2bd8EydBonLWug7MKemJWtZxfSeL/1Iiu6jbFbKWpscID7Lp9d1eAJYEzNntvN5je1bZxcaf 66WHLZotQQ26rY+ExzF5pcfxPEAFKLHSaXe5knRkhBc3Yg6L7+IBzE5X1kfUIg0jGeAQplvpiyyMD jr/1uZJjTjAsYrU6onkJdbTzZm91VaeaUcIGtd19Z0+8NJ9LtQiAzwruCJl6HeUBlVUL/yBI3CGdB nVzK38SbqEHd9Q==; In-Reply-To: (message from Yuan Fu on Wed, 28 Aug 2024 21:54:26 -0700) 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:290907 Archived-At: > From: Yuan Fu > Date: Wed, 28 Aug 2024 21:54:26 -0700 > Cc: Stefan Kangas , > Alan Mackenzie , > 64830@debbugs.gnu.org > > Ah, thanks for the review! TIL. Here’s the revised patch. A few more nits: > + 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? > +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. > +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". Thanks.