[Top][All Lists]

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

Re: A vision for multiple major modes: some design notes

From: Alan Mackenzie
Subject: Re: A vision for multiple major modes: some design notes
Date: Sat, 23 Apr 2016 17:14:51 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Andy.

On Fri, Apr 22, 2016 at 02:42:07PM +0100, Andy Moreton wrote:
> On Thu 21 Apr 2016, Alan Mackenzie wrote:

[ .... ]

> Care will be needed to allow more than one island chain using the same
> inner mode, where the chains represent unrelated documents that are
> independently embedded in the larger document.

This is built into the fabric of the mechanism, and shouldn't present a

> >> >   o - `scan-lists', `scan-sexps', etc. will treat a "foreign" island as
> >> >     whitespace, much as they do comments.  They will also treat as 
> >> > whitespace
> >> >     the gap between two islands in a chain.

> >> Why whitespace? why not some new category?  By overloading whitespace,
> >> you make things harder on the underlying infrastructure, like regexp
> >> search and matching.

> > I think it's clear that the "foreign" island's syntax has no interaction
> > with the current island.  If we treat it as whitespace, that should
> > minimise the amount of adapting we need to do to existing major modes.

> There may be some interaction. The language used for the enclosing text
> (using the super mode) may require quoting and escaping to be performed
> on the content embedded in it. This means that the textual
> representation of the content in the island chain may depend on what it
> is embedded into.

Good point!  Thanks.

> The inner mode for the island chain will either need to be aware of this
> quoting and escaping syntax (belonging to the super mode), or the text
> in the island chain will need to be unescaped and unquoted for the inner
> mode to make sense of it.

Umm.  Yes, that could happen.  Hopefully it won't be a big problem in

>     AndyM

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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