Ikumi Keita <[email protected]> writes: >> Text [% >> Do we have the same level of confidence for [? >> \end{document} > > Well, isn't it almost impossible? AUCTeX cannot know whether the > author intends to insert closing "]" later but hasn't done that yet, > or "]" is to be really missing when the document is complete.
I guess that's most probably the reason nobody tried indenting stuff in [...], yet. And unbalanced brackets are quite common in variants of interval notation, e.g., the interval from 0 (inclusive) to 10 (exclusive) is frequently written as [0,10) or [0,10[ so I guess one wouldn't want to have an effect on indentation at least in math context. > I feel that it isn't worth discriminating whether a leading "[" is a > delimiter of optional argument for a macro/environment or a part of > ordinary text. How about introducing a new user option to determine > whether indentation inside "[]" should be done or not? Or maybe another way would be to have some restrictive contract when exactly indentation should occur, e.g., only after [% until the next ] at beginning of a line (possibly preceeded by only whitespace). But even then it might become annoying and unexpected if do have [% in your document but don't follow the "end rule"... Bye, Tassilo
