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: Sat, 24 Jul 2021 02:42:24 -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>
>> 
>> Yes, I meant to discuss this. The problem with respecting narrowing
>> is that, a user can freely narrow and widen arbitrarily, and Emacs
>> needs to translate them into insertion & deletion of the buffer text
>> for tree-sitter, every time a user narrows or widens the buffer.
>> Plus, if tree-sitter respects narrowing, it could happen where a
>> user narrows the buffer, the font-locking changes and is not correct
>> anymore. Maybe that’s not the user want. Also, if someone narrows
>> and widens often, maybe narrow to a function for better focus,
>> tree-sitter needs to constantly re-parse most of the buffer. These
>> are not significant disadvantages, but what do we get from
>> respecting narrowing that justifies code complexity and these small
>> annoyances?
>
> But that's how the current font-lock and indentation work: they never
> look beyond the narrowing limits.  

And that's broken, unless the narrowing is for multi-major-mode.

-- 
-- Stephe



reply via email to

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