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: Dmitry Gutov
Subject: Re: antlr-mode.el - need some support by python.el
Date: Wed, 18 Feb 2015 17:13:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 02/18/2015 07:48 AM, Stefan Monnier wrote:

> Narrowing sucks, so no it's not a viable alternative.

Do you suppose the submodes will implement prog-indentation-context support using something other than narrowing? It's a powerful approach.

LEFTMOST-COL, likewise, can by added by the calling function.  No need to
make the submode's indentation function be aware of it.

Yes and no: currently, the standard API to indentation is just
indent-line-function which performs the indentation directly, rather
than returning an indentation column.  So implementing LEFTMOST-COL
"outside" means re-indenting after you called the indentation function.

I think I'd rather change the indent-line-function API, to return the column offset. Or add a new one, like `line-indentation-function'.

Furthermore, I can imagine some cases where the inner mode may still
want to indent to a column smaller than LEFTMOST-COL for good reasons.

I wonder what that is. But anyway, line-indentation-function would return a negative value in that case.



reply via email to

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