Subject: bug#71048: closed (Re: bug#71048: The manual should have an example for treesit-language-at-point-function)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 22 May 2024 06:25:03 +0000

Your bug report

#71048: The manual should have an example for treesit-language-at-point-function

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71048: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71048
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#71048: The manual should have an example for treesit-language-at-point-function
From: Yuan Fu <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: Dmitry Gutov <[email-masked]>, [email-masked]
Date: Tue, 21 May 2024 23:23:32 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

> On May 18, 2024, at 10:56 PM, Eli Zaretskii <[email-masked]> wrote:
> 
>> Date: Sun, 19 May 2024 02:00:23 +0300
>> From: Dmitry Gutov <[email-masked]>
>> 
>> https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html 
>> has code examples for multiple-language setup (with tree-sitter modes), 
>> and it more-or-less says that treesit-language-at-point-function should 
>> be set.
>> 
>> But there is a default behavior for when it's not set, and the code 
>> snippets in the second half of the page don't set it, so it seems prone 
>> to mistakes.
>> 
>> I think the examples should include a setting for 
>> treesit-language-at-point-function.
>> 
>> Inspired by https://github.com/dgutov/mmm-mode/issues/142
> 
> Yuan, could you please add such examples?

Yes, I think that’s a good suggestion, and I just did that.

Yuan

Subject: The manual should have an example for treesit-language-at-point-function
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Sun, 19 May 2024 02:00:23 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html 
has code examples for multiple-language setup (with tree-sitter modes), 
and it more-or-less says that treesit-language-at-point-function should 
be set.

But there is a default behavior for when it's not set, and the code 
snippets in the second half of the page don't set it, so it seems prone 
to mistakes.

I think the examples should include a setting for 
treesit-language-at-point-function.

Inspired by https://github.com/dgutov/mmm-mode/issues/142