GNU bug report logs -
#73191
30.0.91; missing some keywords in c++-ts-mode
Previous Next
Reported by: Yang Yingchao <yang.yingchao <at> qq.com>
Date: Thu, 12 Sep 2024 06:36:01 UTC
Severity: normal
Found in version 30.0.91
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 14 Sep 2024 11:11:19 -0700
with message-id <D9CB9763-252E-4FCA-9D50-4A505DB09274 <at> gmail.com>
and subject line Re: bug#73191: Acknowledgement (30.0.91; missing some keywords in c++-ts-mode)
has caused the debbugs.gnu.org bug report #73191,
regarding 30.0.91; missing some keywords in c++-ts-mode
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
73191: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73191
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Some keywords are missing in `c++-ts-mode`, compared to `c++-mode` (defined
in `cc-langs.el`), notably: "virtual," "thread_local," and maybe others.
Regargs
yang
[Message part 3 (message/rfc822, inline)]
> On Sep 14, 2024, at 3:05 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Date: Thu, 12 Sep 2024 14:40:26 +0800
>> From: Yang Yingchao via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> On Thu, Sep 12 2024, GNU bug Tracking System wrote:
>>
>> Update: `virtual` works fine, only `thread_local` is not highlighted...
>
> Yuan,
>
> Could you please look at this?
>
> It sounds like we lack "thread_local" (and also "virtual"?) in
> c-ts-mode--keywords. But when I tried to add them I found a more
> serious problem: with the current C++ grammar library I see the
> following messages in *Messages*:
>
> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 677 "[\"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"requires\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'")
>
> Could you please look at this and fix it ASAP, since this is affecting
> the release branch?
>
> TIA
Yeah, sorry that I missed this report. And lol, tree-sitter-cpp changed “virtual” to (virtual) in May and then changed it back a few days ago.
I added “thread_local" keyword and added logic to use (virtual) or “virtual” depending on the grammar.
Yuan
This bug report was last modified 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.