emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Yuan Fu
Subject: Re: How to add pseudo vector types
Date: Fri, 16 Jul 2021 10:27:36 -0400

> 
> Each command/feature that needs an updated TS tree will take care of
> updating TS with the relevant information.  We should record whatever
> we need for that as side effect of primitives that change buffer text
> (in insdel.c), and use the recorded info to update TS.  But the actual
> passing of text to TS should happen lazily, when we actually need its
> re-parsing, not when the changes to buffer text are done.

Ok, I will write it like that. Another question, how do I add a new field in 
struct buffer? I tried to add

        Lisp_Object ts_parser_list_;

Before 

        Lisp_Object cursor_in_non_selected_windows_;

But that wouldn't dump.

I want to put the parsers in a field rather than in a buffer local variable 
because I don’t want users to add/remove parsers from this list freely, 
otherwise the parsers could go out of sync. I plan to provide functions like 
add-parser, remove-parser, buffer-parser-list for users to access this list.

Yuan


reply via email to

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