emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug #25608 and the comment-cache branch


From: zhanghj
Subject: Re: Bug #25608 and the comment-cache branch
Date: Mon, 13 Feb 2017 09:47:45 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

>
> Multiple-major-mode code?  Narrowing is not a good way of doing this,
> and I propose a better way.
>
>> > If I understand correctly, the problem is that multiple-major-mode modes
>> > are trying to use narrowing to get a null syntactic context.  They are
>> > trying this because we don't provide anything better.  We should provide
>> > something better.  I suggested such a something last spring ("islands").
>
>> You suggested implementing a big, ambiguously defined feature.
>
> It was big, yes, but reasonably well defined.  What I really meant in my
> last paragraph was that the syntax bits of "islands" should be used in
> place of what is now done with narrowing.  This would introduce two new
> syntax classes "open island" and "close island".  "Open island" would
> stack the current syntactic state and start anew, with a new syntax
> table.  "Close island" would pop this stack, restoring the previous
> state and syntax table.
>

How about adding two text properties like island-major-mode and
island-variables? All chars in the same island have the same values of
the two text properties.



reply via email to

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