emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode fontification feels random


From: Ergus
Subject: Re: cc-mode fontification feels random
Date: Sat, 12 Jun 2021 19:54:30 +0200

On Sat, Jun 12, 2021 at 01:25:14PM -0400, Stefan Monnier wrote:
Agreed.  Maybe a first step would be to get copyright assignments and
include the tree sitter module in GNU ELPA?
If I read some of these mails correctly it seems like that wouldn't be
possible due to interest from some of the parties involved in the main
package.  I don't know the details on that, though.

Before we start a parallel effort, we definitely should make every effort
to get copyright assignments for the existing code.  Maybe we can't take
the package as-is because some contributors won't accept to sign the
paperwork, but we can probably get paperwork for a significant fraction
of the code.

That would already help reduce duplicated efforts.

This is very important, not just to reduce the amount of work, but also
to avoid alienating interested parties.

I agree, but it looks like Eli wants a different approach for the
calling and a part of the performance issues come from the font-lock and
Lisp hooks and translations forth and back. Something that a package
implemented with modules still do at some level.

Will you write to the authors on GH? There are only 17 contributors, so
not a crazy number of copyrights to get.

What is wondering me is that managing copyright usually is a never
ending problem. We are still waiting for use-package to get all of
them. And every time we say to gather copyrights then there is a dead
time and the topic is forgotten after a while.

The package was designed to be an external feature so it may use some
"inefficient" solutions (lisp calls from C, substring, font-lock init
functions) that could be cleaned and improvement to access internal C
code directly; that will require a deeper knowledge of the package and
emacs C code to be handled, and I don't know how available will be the
developers to do so.



And Eli seems unhappy with what's there.

That doesn't mean we have to start over from scratch.

That's true. But the approach implemented with modules or internally in
emacs may be very different right?

As for making a little more concrete proposal for how to move forward,
would this be something like what we want?
- create/use c or rust bindings

I think we'd want to link to the C API of tree-sitter.
There's no point going through Rust at this point, AFAICT.

- create an elisp-layer for interaction with the parse tree
- hook fontification and indentation into that elisp-layer

Sounds about right.


       Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]