[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: Wed, 04 Mar 2015 19:20:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 03/04/2015 06:53 PM, Wedler, Christoph wrote:

I just remember the following: if we would introduce a
prog-indent-calculate-function, we could as well pass that value as
argument to that function (with a benefit that the value will be more
likely be respected).

That's a considerable benefit, IMO.

But this would not be enough: we need to do something similar to
`indent-region-function', i.e. the different indent region functions
should also respect LEFTMOST-COL.

IME, most of the time that variable's value is nil. But of course, we could pass an extra argument to it too (and fall back to the current calling convention if the call signals `wrong-number-of-arguments'.

In my opinion, this would only worth the trouble if we can get
completely rid of `prog-indentation-context'.

Yes, probably.

If we do the START/END boundaries via narrowing, we probably
induce too much work in major modes.  As I wrote earlier: all
functions which are called by the indent calculation must not call widen

How is it "too much work"? I've written my share of indentation code, and the only related function that I found useful were `save-restriction' and `narrow-to-region'.

reply via email to

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