Subject: bug#64830: 30.0.50 C++ treesitter mode no coloration

From: Eli Zaretskii <[email-masked]>
Date: Thu, 29 Aug 2024 09:01:08 +0300

> From: Yuan Fu <[email-masked]>
> Date: Wed, 28 Aug 2024 21:54:26 -0700
> Cc: Stefan Kangas <[email-masked]>,
>  Alan Mackenzie <[email-masked]>,
>  [email-masked]
> 
> 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.