emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-tree-sitter and Emacs


From: Eli Zaretskii
Subject: Re: emacs-tree-sitter and Emacs
Date: Fri, 03 Apr 2020 09:37:08 +0300

> From: 조성빈 <address@hidden>
> Date: Fri, 3 Apr 2020 04:39:08 +0900
> Cc: Michael Welsh Duggan <address@hidden>, address@hidden,
>  address@hidden, address@hidden
> 
> > Yes, with one correction: ideally, it should be unnecessary to start
> > from point-min (which could be a long way away).  Most languages
> > should do well enough with starting from the beginning of the
> > outermost function or class that affects the displayed text.
> 
> AFAIU, determining that starting point is a non-trivial task, and if Emacs 
> wants to present the user an exact representation, the text from point-min is 
> still needed: just a hypothetical case would be having a file with all code 
> commented out.

The decision whether there's a need to go to the beginning should be
made by the parser, not by the infrastructure that invokes it.  If the
parser needs access to earlier parts of the buffer, it should do that;
but the fontification infrastructure should not force it to do that.



reply via email to

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