|
From: | Dmitry Gutov |
Subject: | Re: antlr-mode.el - need some support by python.el |
Date: | Sat, 21 Mar 2015 17:30:55 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 |
On 03/10/2015 03:16 AM, Stefan Monnier wrote:
I'm not sure what you mean by that question: if the outer mode uses narrowing to specify the bounds of the chunk, then indentation code can't use `widen'. Use of narrowing inside the indentation code will be fine, but use of widen will not. Yet, "grep widen lisp/progmodes/*.el" suggests that it's probably used by several indenters.
The same places that use `widen' now would have to be adapted anyway, whether not to use it at all, or to behave according to the new variable.
The former change sounds simpler to me.
I think specifying the chunk bounds via some dynamically-scoped var is a pretty safe option. Maybe it will be supplanted in the future by some other alternative, but it doesn't impose any particular implementation constraint, contrary to the use of narrowing.
What do you think of `prog-narrow-to-region' and `prog-widen'?Just having a dynamically-scoped var by itself seems a more verbose and error-prone approach to me.
[Prev in Thread] | Current Thread | [Next in Thread] |