ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ada-mode-users] inconsistent indentation of function parameter lists at


From: Ludovic Brenta
Subject: [Ada-mode-users] inconsistent indentation of function parameter lists at call sites
Date: Mon, 21 Nov 2016 17:37:15 +0200
User-agent: Roundcube Webmail/0.5.3

Hello,

in the program below (indented by ada-node 5.2.1) we see that the
opening paren is indented by ada-indent relative to the first non-
blank character in the preceding line, not the function name.  This
yields results that are visually inconsistent.  Our preferred style
is always to indent the opening paren relative to the name of the
function, as in [1bis] and [3bis]:

procedure P is
  function F (A : Boolean; B : Boolean) return Boolean is (A and B);
  X : Boolean;
begin
  X
    := F
      (A => True,
       B => False); -- [1]
  X := F (A => True,
          B => False); -- [2]
  X := F
    (A => True,
     B => False); -- [3]
  -- Below are examples not indented by ada-mode:
  X
    := F
         (A => True,
          B => True); -- [1bis]
  X := F
         (A => True,
          B => True); -- [3bis]
end P;

I'd like to send a patch but I'm afraid I don't understand the
indentation engine well enough for that.

--
Ludovic Brenta.




reply via email to

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