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: Stephen Leake
Subject: Re: How to add pseudo vector types
Date: Thu, 29 Jul 2021 15:58:39 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Yuan Fu <casouri@gmail.com>
>> Date: Wed, 28 Jul 2021 12:36:33 -0400
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>>  emacs-devel <emacs-devel@gnu.org>,
>>  Clément Pit-Claudel <cpitclaudel@gmail.com>,
>>  monnier@iro.umontreal.ca
>> 
>> > So don't send a change that deletes the hidden text; just send changes
>> > in the visible part of the text (that's the only place the user can make
>> > changes). tree-sitter will only run the scanner on the change regions,
>> > so it will only request text from the visible part of the buffer;
>> > all the requests will succeed.
>> 
>> Then we are not hiding the hidden text from tree-sitter. The
>> implementation you described, IIUC, is essentially do nothing
>> special when the buffer is narrowed.
>
> If the TS parser is called while the narrowing is in effect, it will
> be unable to access text beyond BEGV..ZV.  So in that case the
> narrowing _will_ affect TS.

Please read again; TS is affected in principle, but in practice, in the
absence of programming errors, it will never try to access text outside
the narrowing, so it won't notice.

-- 
-- Stephe



reply via email to

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