unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement
@ 2018-12-14 17:22 Ludovic Brenta
  2018-12-14 18:24 ` bug#33746: [Ada-mode-users] " Simon Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ludovic Brenta @ 2018-12-14 17:22 UTC (permalink / raw)
  To: 33746; +Cc: ada-mode-users

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@nongnu.org

Hello,

Here is another minor indentation bug in ada-mode 6.0.0; note how
the indentation of the two comments is inconsistent:

procedure When_Indentation is
begin
   case A is
     when B =>
       -- This comment is indented correctly
       Foo;
     -- This comment is indented incorrectly: should be as above
   end case;
end When_Indentation;

-- 
Ludovic Brenta.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33746: [Ada-mode-users] bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement
  2018-12-14 17:22 bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement Ludovic Brenta
@ 2018-12-14 18:24 ` Simon Wright
  2019-03-25 16:42 ` bug#33746: update Stephen Leake
  2019-03-25 16:42 ` Stephen Leake
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Wright @ 2018-12-14 18:24 UTC (permalink / raw)
  To: Ludovic Brenta; +Cc: 33746, ada-mode-users

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

On 14 Dec 2018, at 17:22, Ludovic Brenta <ludovic@ludovic-brenta.org> wrote:
> 
> Package: emacs, ada-mode
> X-Debbugs-CC: ada-mode-users@nongnu.org
> 
> Hello,
> 
> Here is another minor indentation bug in ada-mode 6.0.0; note how
> the indentation of the two comments is inconsistent:
> 
> procedure When_Indentation is
> begin
>  case A is
>    when B =>
>      -- This comment is indented correctly
>      Foo;
>    -- This comment is indented incorrectly: should be as above
>  end case;
> end When_Indentation;

GPS goes too far the other way if you select (what was for me) the default, Indent comments => unchecked, Align comments on keywords checked; the same with both unchecked. ludo-problems.adb.

If I check just Indent comments, I get ludo-problems-2.adb.


[-- Attachment #2: ludo-problems.adb --]
[-- Type: application/octet-stream, Size: 640 bytes --]

procedure Comment_Indentation is
begin
   if A
     -- This comment is indented correctly
     and then B
       -- This comment is indented incorrectly, should be as above
   then
      -- This comment is indented correctly
      null;
   elsif C
     -- This comment is indented correctly
     and then D
       -- This comment is indented incorrectly, should be as above
   then
      null;
   end if;
end Comment_Indentation;

procedure When_Indentation is
begin
   case A is
      when B =>
	 -- This comment is indented correctly
	 Foo;
	 -- This comment is indented incorrectly: should be as above
   end case;
end When_Indentation;

[-- Attachment #3: ludo-problems-2.adb --]
[-- Type: application/octet-stream, Size: 649 bytes --]

procedure Comment_Indentation is
begin
   if A
   -- This comment is indented correctly
     and then B
   -- This comment is indented incorrectly, should be as above
   then
      -- This comment is indented correctly
      null;
   elsif C
   -- This comment is indented correctly
     and then D
   -- This comment is indented incorrectly, should be as above
   then
      null;
   end if;
end Comment_Indentation;

procedure When_Indentation is
begin
   case A is
      when B =>
         -- This comment is indented correctly
         Foo;
         -- This comment is indented incorrectly: should be as above
   end case;
end When_Indentation;

[-- Attachment #4: Type: text/plain, Size: 1 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33746: update
  2018-12-14 17:22 bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement Ludovic Brenta
  2018-12-14 18:24 ` bug#33746: [Ada-mode-users] " Simon Wright
@ 2019-03-25 16:42 ` Stephen Leake
  2019-03-25 16:42 ` Stephen Leake
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Leake @ 2019-03-25 16:42 UTC (permalink / raw)
  To: 33746

Fixed in ada-mode 6.1.0 in GNU ELPA
-- 
-- Stephe





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33746: update
  2018-12-14 17:22 bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement Ludovic Brenta
  2018-12-14 18:24 ` bug#33746: [Ada-mode-users] " Simon Wright
  2019-03-25 16:42 ` bug#33746: update Stephen Leake
@ 2019-03-25 16:42 ` Stephen Leake
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Leake @ 2019-03-25 16:42 UTC (permalink / raw)
  To: 33746-close


-- 
-- Stephe





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-25 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14 17:22 bug#33746: 26.1; ada-mode 6.0.0 indentation of comments in a case statement Ludovic Brenta
2018-12-14 18:24 ` bug#33746: [Ada-mode-users] " Simon Wright
2019-03-25 16:42 ` bug#33746: update Stephen Leake
2019-03-25 16:42 ` Stephen Leake

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).