[Top][All Lists]

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

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

From: Dmitry Gutov
Subject: Re: antlr-mode.el - need some support by python.el
Date: Mon, 02 Mar 2015 17:08:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 03/02/2015 07:23 AM, Stefan Monnier wrote:

Why?  This "code which operates on this region" can very easily want to
call indent-according-to-mode or syntax-ppss to do its job.

Maybe we can say that code inside narrowing is only allowed to call `generic' features, which may or may not perform widening themselves.

For indent-according-to-mode, see my previous message.

The uses of `syntax-ppss' are harder to classify, but for font-lock we at least have font-lock-dont-widen. It's hard for the "inner" code to know whether it's allowed to widen, so when in doubt, it probably shouldn't.

But to keep the current code everywhere more or less unchanged, we can come from the other side and use an extra-flexible solution: introduce `widen-function' or `widen-bounds'. The former would be the function `widen' would delegate to from now on (and the interested parties would be able to bind it to #'ignore), and the latter would be the maximum bounds the new implementation of `widen' would widen to.

reply via email to

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