Markus Schöpflin <[email protected]> writes:

> Am 02.03.2014 18:24, schrieb Stephen Leake:
>> Stephen Leake <[email protected]> writes:
>
> [...]
>
>> Actually, I think it's the second (Foo that is misindented. I'll add
>> digits to make things easier to refer to. Consider:
>>
>>     Foo_1 :=
>>       (
>>        Foo_2 => Foo_3
>>          (Foo_4 => Foo_5),
>>        Bar_1 => Bar_2
>>          (Bar_3 => Bar_4));
>>
>>     Baz_1 := Baz_2
>>       (1, 2, 3);
>>
>>     Suzy_1 := Suzy_2 +
>>       Suzy_3;
>>
>> I think this is the desired indentation; Foo_3 and Bar_2 are do not
>> terminate a statement, so the next line is indented by
>> ada-indent-broken. This ignores the fact that they are function calls
>> and the next line starts with (.
>>
>> That's consistent with the indentation of "(1, " and Suzy_3.
>>
>> However, when we move Foo_2 up a line to just after the ( :
>>
>>     Foo_1 :=
>>       (Foo_2 => Foo_3
>>         (Foo_4 => Foo_5),
>>        Bar_1 => Bar_2
>>          (Bar_3 => Bar_4));
>>
>> (Foo_4 is now indented by ada-indent-broken relative to the opening
>> paren, which is not what we want. (Bar_3 is ok.
>>
>> So whenever we indent relative to (current-indentation), we need to
>> add 1 if the line starts with an open_paren.
>
> I think you are correct.

Ok, thanks.

> BTW, when I press <enter> just after Foo_3 and then <tab> on the now
> empty line I get the following parse error:
>
> Error: (error "cl-ecase failed: aggregate, (actual_parameter_part
> association_list exception_handler case_statement_alternative
> case_expression_alternative generic_renaming_declaration primary)")
> wisi-indent-line: Wrong type argument: number-or-marker-p, nil

I get the error on <enter>. Fixed in 5.0.2

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to