GNU bug report logs -
#64830
29.1; C++ treesitter mode no coloration
Previous Next
Reported by: David Come <david.come <at> ageagle.com>
Date: Mon, 24 Jul 2023 10:34:01 UTC
Severity: normal
Merged with 64818
Found in versions 29.1, 30.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #97 received at 64830 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Finally able to address this again.
> On Aug 28, 2024, at 11:01 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Wed, 28 Aug 2024 21:54:26 -0700
>> Cc: Stefan Kangas <stefankangas <at> gmail.com>,
>> Alan Mackenzie <acm <at> muc.de>,
>> 64830 <at> 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?
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’t 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.
>
>> +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”.
Done. Please take a look at the latest patch, thanks!
Yuan
[grammar-location.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
This bug report was last modified 254 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.