Subject: bug#70016: Emacs 29.3 treesit-parser-list function parameters differ from the master branch

From: Yuan Fu <[email-masked]>
Date: Wed, 27 Mar 2024 21:47:12 -0700

> On Mar 26, 2024, at 12:25 PM, Eli Zaretskii <[email-masked]> wrote:
> 
>> Cc: [email-masked]
>> Date: Tue, 26 Mar 2024 11:23:00 +0800
>> From:  Meow King via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <[email-masked]>
>> 
>> I think it may be a bug (accidentally change code?) so I report it here.
>> 
>> Emacs 29.3 treesit-parser-list only accepts one parameter (i.e. BUFFER),
>> but the treesit-parser-list on the latest Master Branch doesn't change,
>> accepting three optional parameters. 
> 
> According to "git log", it was a deliberate change.
> 
> Yuan, why did we change the signature, and why isn't tyhis called out
> in NEWS?

I believe we only changed the signature from one optional arg to three optional args, on master. Treesit-parser-list never had one mandatory arg.

We changed the signature to three optional args to a) allow users to get parsers for a specific language, and b) allow users to get parsers with a specific tag. Parser tags are used by local parsers.

I should have added a NEWS entry, but apparently I forgot :-) Sorry about that. I’ll add it, along with other functions that I said I’ll wait a bit more before documenting (it’s about time).

Yuan