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: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Mon, 26 Jul 2021 22:20:32 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Mon, 26 Jul 2021 15:06:14 -0400
> Cc: Stephen Leake <stephen_leake@stephe-leake.org>,
>  cpitclaudel@gmail.com,
>  monnier@iro.umontreal.ca,
>  emacs-devel@gnu.org
> 
> > 
> >>> If we let TS look where it wants, we will lose the ability to restrict
> >>> it to a certain part of the buffer text.  This is needed at least for
> >>> some specialized modes, and is generally desirable, as it gives Lisp
> >>> programs an easy way to impose such restrictions whenever they need.
> >> 
> >> Tree-sitter lets you set ranges for a parser to limit it self within, in 
> >> order to support multi-language files.
> > 
> > That's okay, but why would we want to expose this to Lisp as the means
> > to restrict the accessible portion, when we already have such a means?
> 
> Tree-sitter lets you set multiple discontinuous ranges, whereas narrowing can 
> only narrow to a single continuous range. Multiple discontinuous range is 
> much more useful for HTML+CSS+JS, or PHP + HML.

I understand.  But forcing various Emacs features to use these ranges
where a simple restriction will do makes little sense.

Last time something like these discontinuous ranges was discussed as a
general feature in Emacs, we couldn't come up with an agreed-upon
design and implementation.  So adding something like that to Emacs is
not an easy job.



reply via email to

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