emacs-devel
[Top][All Lists]
Advanced

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

Re: antlr-mode.el - need some support by python.el


From: Stefan Monnier
Subject: Re: antlr-mode.el - need some support by python.el
Date: Mon, 08 Jun 2015 09:26:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> I think the string value is not ideal, because then the inner mode can't
>> cache syntactic information, and reuse it between chunks.  This is
>> something we probably want to facilitate.

Maybe we should simply document that it's valid&expected for the inner
mode to add text-properties to the string.

>  - the inner mode is encouraged to change PREVIOUS-CHUNKS inside
>    `prog-indentation-context' to the inner mode specific value.  The
>    outer mode can retrieve the value after the call and use it for
>    further calls.

This looks fiddly, and at least requires changing the doc of
PREVIOUS-CHUNKS to mention that it can contain yet some other data in
some "internal" format.

> The get-previous-chunk function case (for literate programming = the
> case Stefan and you, Dmitry, were interested in): I agree, this is
> non-trivial (see my remarks back in Feb/Mar).

I can't imagine it being significantly more complex than the string case.
In the worst case, you can fairly easily turn the function into a string
by extracting&concatenating the corresponding chunks.


        Stefan



reply via email to

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