From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 75226@debbugs.gnu.org, Jacob Faibussowitsch <jacob.fai@gmail.com>
Subject: bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
Date: Fri, 3 Jan 2025 00:50:46 -0800 [thread overview]
Message-ID: <95EAF964-0C9F-4719-8AF0-4F9912C9FC8B@gmail.com> (raw)
In-Reply-To: <86ed1llntt.fsf@gnu.org>
> On Jan 1, 2025, at 10:41 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Cc: 75226@debbugs.gnu.org
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Wed, 1 Jan 2025 19:28:35 -0800
>>
>>
>>
>>> On Dec 31, 2024, at 8:01 AM, Jacob Faibussowitsch <jacob.fai@gmail.com> wrote:
>>>
>>> C++ ts-mode is missing “alignof” as a builtin keyword like sizeof.
>>>
>>> Best Regards,
>>>
>>> Jacob Faibussowitsch
>>> (Jacob Fai - booss - oh - vitch)
>>>
>>
>> Thanks for reporting this. It seems tree-sitter-c/cpp supports '__alignof__', '__alignof', '_alignof', 'alignof', ‘_Alignof’, I can add all of them as keywords. The feature is added in tree-sitter-c in Aug 9, 2023 [1], and appears in v0.20.5.
>>
>> Eli, what’s the status of Emacs 30 right now? Can I push to emacs-30 and have this change queued for Emacs 30.2? Or should I wait a bit?
>
> If this just adds a bunch of strings to c-ts-mode--keywords, it's okay
> to add them on emacs-30.
Not quite, right now emacs-30’s c-ts-mode works with grammar as far back as v0.19.0 [1]. If we just add the keywords, c-ts-mode wouldn’t work with grammar v0.20.4 and earlier. So I’m going to add the new keywords with a check, which disables the new keywords if grammar doesn’t recognize them. Also there’re many missing keywords, none of which I have seen before :-), I need time to go over them and see how are they supposed by be fontified (keyword face or something else).
So let’s wait for 30.2.
[1] It might work with even earlier versions but I didn’t test, v0.19.0 (4 years ago) is the earliest version that still has compatible LANGUAGE_VERSION (13) with the latest tree-sitter lib.
Yuan
next prev parent reply other threads:[~2025-01-03 8:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 16:01 bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword Jacob Faibussowitsch
2025-01-02 3:28 ` Yuan Fu
2025-01-02 5:06 ` Stefan Kangas
2025-01-02 6:41 ` Eli Zaretskii
2025-01-02 14:03 ` Jacob Faibussowitsch
2025-01-02 15:47 ` Eli Zaretskii
2025-01-03 8:50 ` Yuan Fu [this message]
2025-01-03 11:38 ` Eli Zaretskii
2025-01-04 7:34 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95EAF964-0C9F-4719-8AF0-4F9912C9FC8B@gmail.com \
--to=casouri@gmail.com \
--cc=75226@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jacob.fai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).