emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration on feature/tree-sitter


From: Yuan Fu
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Fri, 17 Jun 2022 17:14:58 -0700


> On Jun 17, 2022, at 3:37 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 17 Jun 2022 00:17:54 -0700
>> Cc: emacs-devel@gnu.org
>> 
>>>> Moving forward, I want to make treesit-parser-list internal and turn it 
>>>> into a function that returns the parser list. And add a function to remove 
>>>> a parser from the parser list.
>>> 
>>> And a function to add to the list, right?  Or does it already exist?
>> 
>> Creating a parser automatically adds it to the parser list of a buffer.
> 
> Then removing a parser means we actually delete it?

Not sure what do you men “delete”. Treesit-parser-delete removes the parser 
from the parser list of a buffer, so it is never kept up-to-date with that 
buffer again. But you can still do stuff with it until it is gc’ed. I probably 
should add checks that prohibit using a parser after it has been deleted.

Yuan


reply via email to

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