* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
@ 2024-12-31 16:01 Jacob Faibussowitsch
2025-01-02 3:28 ` Yuan Fu
0 siblings, 1 reply; 9+ messages in thread
From: Jacob Faibussowitsch @ 2024-12-31 16:01 UTC (permalink / raw)
To: 75226
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
C++ ts-mode is missing “alignof” as a builtin keyword like sizeof.
Best Regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
[-- Attachment #2: Type: text/html, Size: 734 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
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
0 siblings, 2 replies; 9+ messages in thread
From: Yuan Fu @ 2025-01-02 3:28 UTC (permalink / raw)
To: Jacob Faibussowitsch; +Cc: 75226
> 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?
[1] https://github.com/tree-sitter/tree-sitter-c/commit/8e919ab298b6e4d05ee29b10482de4fcfb075074
Yuan
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
2025-01-02 3:28 ` Yuan Fu
@ 2025-01-02 5:06 ` Stefan Kangas
2025-01-02 6:41 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2025-01-02 5:06 UTC (permalink / raw)
To: Yuan Fu, Jacob Faibussowitsch; +Cc: 75226
Yuan Fu <casouri@gmail.com> writes:
> 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?
I'm not Eli, but to have this in Emacs 30.2, you need to wait until
Emacs 30.1 is released first.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
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-03 8:50 ` Yuan Fu
1 sibling, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2025-01-02 6:41 UTC (permalink / raw)
To: Yuan Fu; +Cc: 75226, jacob.fai
> 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.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
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
1 sibling, 1 reply; 9+ messages in thread
From: Jacob Faibussowitsch @ 2025-01-02 14:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Yuan Fu, 75226
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
Should also do `alignas` and friends while you’re at it. I noticed it is missing from `c-ts-mode--keywords` as well.
Best Regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
> On Jan 2, 2025, at 1:41 AM, 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.
>
> Thanks.
[-- Attachment #2: Type: text/html, Size: 4742 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
2025-01-02 14:03 ` Jacob Faibussowitsch
@ 2025-01-02 15:47 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2025-01-02 15:47 UTC (permalink / raw)
To: Jacob Faibussowitsch; +Cc: casouri, 75226
> From: Jacob Faibussowitsch <jacob.fai@gmail.com>
> Date: Thu, 2 Jan 2025 09:03:26 -0500
> Cc: Yuan Fu <casouri@gmail.com>,
> 75226@debbugs.gnu.org
>
> Should also do `alignas` and friends while you’re at it. I noticed it is missing from `c-ts-mode--keywords` as
> well.
The keywords are all explicit in the grammar's JS source, so how about
check them all, while we are at it?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
2025-01-02 6:41 ` Eli Zaretskii
2025-01-02 14:03 ` Jacob Faibussowitsch
@ 2025-01-03 8:50 ` Yuan Fu
2025-01-03 11:38 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Yuan Fu @ 2025-01-03 8:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 75226, Jacob Faibussowitsch
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
2025-01-03 8:50 ` Yuan Fu
@ 2025-01-03 11:38 ` Eli Zaretskii
2025-01-04 7:34 ` Yuan Fu
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2025-01-03 11:38 UTC (permalink / raw)
To: Yuan Fu; +Cc: 75226, jacob.fai
> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 3 Jan 2025 00:50:46 -0800
> Cc: Jacob Faibussowitsch <jacob.fai@gmail.com>,
> 75226@debbugs.gnu.org
>
> > On Jan 1, 2025, at 10:41 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> 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.
If so, please install on master, and let's consider backporting it to
the emacs-30 branch after 30.1 is released.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#75226: [31.0.50] C++ ts-mode missing "alignof" as keyword
2025-01-03 11:38 ` Eli Zaretskii
@ 2025-01-04 7:34 ` Yuan Fu
0 siblings, 0 replies; 9+ messages in thread
From: Yuan Fu @ 2025-01-04 7:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 75226, Jacob Faibussowitsch
> On Jan 3, 2025, at 3:38 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 3 Jan 2025 00:50:46 -0800
>> Cc: Jacob Faibussowitsch <jacob.fai@gmail.com>,
>> 75226@debbugs.gnu.org
>>
>>> On Jan 1, 2025, at 10:41 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>
>>>> 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.
>
> If so, please install on master, and let's consider backporting it to
> the emacs-30 branch after 30.1 is released.
>
> Thanks.
Sounds good.
Yuan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-01-04 7:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-01-03 11:38 ` Eli Zaretskii
2025-01-04 7:34 ` Yuan Fu
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).