At 2024-11-23 23:39:39, "Eli Zaretskii" <eliz@gnu.org> wrote:
>> Date: Sat, 23 Nov 2024 23:00:16 +0800 (CST)
>> From: "Hiweed Mandriva3" <hiweedmandriva3@163.com>
>> Cc: 74429@debbugs.gnu.org
>>
>> >> Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.
>> >
>> >If you rename the DLL to the name libtree-sitter-0.dll, tree-sitter
>> >major modes should be enabled.
>>
>> after rename, open a C source file and check `c-h m` the major mode is still `c-mode` not `c-ts-mode`.
>
>Just renaming is not enough, you need also to load c-ts-mode.
>
>> Build the latest commit https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=e14007ad631120a3f7521e503c8de86aca849bad
>> of branch eamcs-30 and with library name libtree-sitter-0.24.dll
>> open a C source file and check major mode is still `c-mode`
>>
>> How do I check whether tree-sitter works well exactly? Thanks.
>
>See above. Recipe:
>
> emacs -Q
> M-x load-library RET c-ts-mode RET
> C-x C-f some-file.c RET
> M-: major-mode RET
>
>The above should yield c-ts-mode.
Thanks for the steps!
By following them, tree-sitter major mode c-ts-mode works well for emacs-30 branch.
I will try master branch after the building issue is resolved.