[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ada-mode-users] Indentation of parameter list at start of line
From: |
Stephen Leake |
Subject: |
Re: [Ada-mode-users] Indentation of parameter list at start of line |
Date: |
Thu, 06 Oct 2016 13:45:53 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Ludovic Brenta <address@hidden> writes:
> Hello,
>
> ada-mode 5.0 indents the opening parenthesis by ada-indent - 1
> relative to the line containing the "function" or "procedure" keyword:
>
> function F
> (Param : Integer) return Boolean;
>
> By default, ada-indent is 3 and so the opening parenthesis is indented
> by 2 relative to "function". This is hardcoded in ada-wisi.el, line
> 409, IIUC.
Yes. This is to make subsequent lines be indented by ada-indent.
> We have set ada-indent to 2 and we would like to have the opening
> parenthesis indented by 2, not 1. I think this would require a new
> custom variable that gets set by default to ada-indent - 1. Am I
> correct?
That would be one way.
However, in other cases, ( is indented by ada-indent-broken. When
ada-indent = 3 and ada-indent-broken = 2, the distinction is moot.
Since those are the settings I test with, and that most people use, we
can just change it so ( is always indented by ada-indent-broken.
Would that work for you?
I'm currently doing significant clean up in the ada-wisi.el indent code,
in branch o.e.a.stephe-4. That version makes it much clearer what is going
on here.
As of 84c833df1fbe6c0179ffb6501bf342dc547d9411, all the indent tests
pass, with only a few minor changes from the o.e.ada-mode test cases.
So if you want to actually try this change, I suggest you do it on
o.e.a.stephe-4, near line 406 in ada-wisi.el; just delete the special
case that uses (1- ada-indent).
I have more cleanup to do in that branch, so this is not a formal
request for wide testing of it.
--
-- Stephe