Subject: bug#60376: 29.0.60; Standardize csharp-ts-mode's font-lock features

From: Yuan Fu <[email-masked]>
Date: Thu, 29 Dec 2022 14:16:13 -0800

Jostein Kjønigsen <[email-masked]> writes:

> Hey Yuan.
>
> Thanks for the heads up!
>
> To be quite honest, that's quite a lot of stuff in such a "little" bug, so if it's OK, I think we should start on the top and work
> our way down.
>
> So a "complete feature freeze" is approaching. That makes complete sense, and I respect that. Are there any exact
> deadlines or dates we'd like to stay ahead of, or is this more an abstract thing, until Emacs 29 is eventually deemed ready
> for release?

I heard that it’s in a few days (from Eli). I believe the idea is that
no more new features could be added to emacs-29 branch, only bug fixes.
This actually should’ve happened when emacs-29 was cut, but tree-sitter
features had an exemption because it was merged relatively late.

> While standardizing font-lock features is probably a good thing, at the end of the day, it does mean changing working
> code. In that regard, I'd like to ensure we don't change more than we need to, to not impose any unneeded risk near the
> feature freeze and eventual Emacs 29 release. Basically, whatever objections I may have, please assume them to be in
> good faith.
>
> As far as standardizing the features, which bar are we standardizing them against, or along with? Are other modes
> getting standardized as well? In case, which?

I’m working on python and javascript. Newer modes I think more or less
follows the "standard list" since they are created after the discussion
of that list.

> To take a personal nitpick as an example... python-ts-mode does not even highlight function-invocations, despite me
> having sent in patches to fix that[1]? How does that play into this standardization? I can't say I've seen much response to
> my bug-report or patch so far, and I mean... We can't standardize features which are not yet even implemented, right? In
> which case, I feel some issues should take precedence over others.

I applied your patch, with some modification (so it aligns with the
standard list). Looking at the bug report, I must’ve forgot to reply to
you after I made the change. That’s my fault.

> I'm not trying to be difficult or anything, but whenever I hear about standardization, I feel these are important questions
> to ask. Left unresolved they can often leads to disenfranchising people from their own works, if they are left feeling like
> they are forced to make changes they disagree with or dont see the benefits of.
>
> I really think this "small" part could definitely use a little more
> details. What's our grand plan?

To make features of each tree-sitter major mode more consistent. We
wouldn’t want features that has the same name but different meaning, or
features of the same meaning but different name.

> How many major-modes does it involve?

Ideally all the built-in major modes.

> And last how much time do we have? Basically: is the overall plan realistic within the timelines we have?

I’m merely suggesting potential improvements to csharp-ts-mode.  As the
maintainer of it, whether it is possible or desirable to make the
changes will be your call ;-)

> So before moving into details about csharp-ts-mode specifically, I'd love to see at least some links to the discussion space
> where the overall standardization has been discussed.

The initial discussion happened on here:

https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01544.html

I just posted a general call to standardize major mode font-lock
features, which stirred up a new discussion about the standard list (as
discussion on mailing lists go :-), it started at here:

https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01202.html

Maybe I should CC people that would be interested in such discussion.

> For the time being, or for now at least, I would be against any standardization-related changes taking place in
> csharp-ts-mode until I've seen such a discussion and been able to raise my voice about any concerns I may have there, if
> any.
>
> Does that make sense? Or does that seem unreasonable or entitled of me?

Your doubts are completely reasonable. As I said, you are the maintainer
of csharp-mode.el, not me, so you can regard my words as a suggestion
rather than request. (Or perhaps nice suggestive request ;-)

Yuan