|
From: | Dmitry Gutov |
Subject: | Re: antlr-mode.el - need some support by python.el |
Date: | Mon, 8 Jun 2015 19:02:59 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 |
On 06/08/2015 04:26 PM, Stefan Monnier wrote:
Maybe we should simply document that it's valid&expected for the inner mode to add text-properties to the string.
Which string? Suppose an inner chunk A is followed by an "external" region, and then an inner chunk B. When we work on the contents of the chunk A, the new variable clearly won't include the contents of that chunk in the PREVIOUS-CHUNKS field. Thus, it's not possible for the code working in A to cache some state in a way accessible to the chunk B (to anny code running when it's current).
Making PREVIOUS-CHUNKS store a list of position pairs (regions), or making it function, both sound better to me.
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.
I agree.
[Prev in Thread] | Current Thread | [Next in Thread] |