unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10572: Indentation for extended return is off by 1
@ 2012-01-20 20:12 Simon Wright
  2012-01-21 19:45 ` Glenn Morris
  2018-12-20 19:24 ` bug#10572: marking ada-mode bug 10572 as wontfix Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Wright @ 2012-01-20 20:12 UTC (permalink / raw)
  To: 10572

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

Package: emacs, ada-mode
Version: 23.3.1

ada-mode version 4.01

NB, when I say 'off by 1' I mean that the compiler complains about the indentation selected.

In the code attached, ada-mode indents the 'for' statement by 2 spaces. The compiler (GCC 4.6.0 and GNAT GPL 2011) with standard style checks (-gnaty) complains:

$ gnatmake -c -u -f extended_return_indentation.adb -gnaty
gcc -c -gnaty extended_return_indentation.adb
extended_return_indentation.adb:1:01: (style) subprogram body has no previous spec
extended_return_indentation.adb:5:06: (style) bad indentation
extended_return_indentation.adb:6:09: (style) bad indentation
extended_return_indentation.adb:7:12: (style) bad indentation
extended_return_indentation.adb:8:09: (style) bad indentation
extended_return_indentation.adb:9:06: (style) bad indentation

If the 'for' statement is indented by 3 spaces, the compilers don't issue the indentation warnings.

[-- Attachment #2: extended_return_indentation.adb --]
[-- Type: application/octet-stream, Size: 306 bytes --]

function Extended_Return_indentation (From : String) return String
is
begin
   return Result : String (1 .. From'Length) := From do
     for J in Result'Range loop
        if Result (J) = 'a' then
           Result (J) := 'A';
        end if;
     end loop;
   end return;
end Extended_Return_indentation;

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

* bug#10572: Indentation for extended return is off by 1
  2012-01-20 20:12 bug#10572: Indentation for extended return is off by 1 Simon Wright
@ 2012-01-21 19:45 ` Glenn Morris
  2018-12-20 19:24 ` bug#10572: marking ada-mode bug 10572 as wontfix Stephen Leake
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2012-01-21 19:45 UTC (permalink / raw)
  To: Simon Wright; +Cc: 10572

Simon Wright wrote:

> Package: emacs, ada-mode

FYI, there is no "ada-mode" package in this tracker.
You can put "ada-mode" somewhere in the subject, it's just as good.





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

* bug#10572: marking ada-mode bug 10572 as wontfix
  2012-01-20 20:12 bug#10572: Indentation for extended return is off by 1 Simon Wright
  2012-01-21 19:45 ` Glenn Morris
@ 2018-12-20 19:24 ` Stephen Leake
  2018-12-20 19:38   ` Glenn Morris
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Leake @ 2018-12-20 19:24 UTC (permalink / raw)
  To: 10572

ada-mode 4.01 is now obsolete and will be removed from emacs 27; please
use 6.0.1 from GNU ELPA.

-- 
-- Stephe





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

* bug#10572: marking ada-mode bug 10572 as wontfix
  2018-12-20 19:24 ` bug#10572: marking ada-mode bug 10572 as wontfix Stephen Leake
@ 2018-12-20 19:38   ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2018-12-20 19:38 UTC (permalink / raw)
  To: Stephen Leake; +Cc: 10572


FYI if you don't reply-to-all the reporter won't see the comment if not
subscribed to the emacs bug list.






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

end of thread, other threads:[~2018-12-20 19:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 20:12 bug#10572: Indentation for extended return is off by 1 Simon Wright
2012-01-21 19:45 ` Glenn Morris
2018-12-20 19:24 ` bug#10572: marking ada-mode bug 10572 as wontfix Stephen Leake
2018-12-20 19:38   ` Glenn Morris

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).