Piotr Trojanek <[email protected]> writes: > I am trying ada-mode 5.2.0 from elpa. On the attached code I expect > indentation of lines marked as "here" and "there" to be equal, but it > is not the case. > > It looks like the problem is in ada-wisi-after-cache, but then I am > just getting lost.
> procedure Test is > X : Boolean := > (case C is > when A => > E = 4 > or else M, -- indentation here > when B => > Fun (E) = 0 > or else M, -- indentation there > when others => > False); This is definitely an odd case. The difference is that 'Fun (E)' is a function call, so indentation is done relative to the 'case' containing that, while 'E' is just a name, so indentation is done relative to the preceding '=>'. The rules in ada-wisi-after-cache try to do sensible things for those two cases. There are examples from the tests cited in the code; see ada-wisi.el line 1057 for indenting 'here', and line 929 for indenting 'there'. Ada syntax is sufficiently complex that it is very difficult to write general rules that give "expected results" in all cases. We could add a special case for '=>' in the code for close-paren; that would fix this example. Is the code above adapted from real code, or were you deliberately looking for corner cases? What does AdaCore GPS, or Eclipse, do in this case? -- -- Stephe _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
