From simon at pushface.org Fri Jan 20 12:12:25 2012 From: simon at pushface.org (Simon Wright) Date: Fri, 20 Jan 2012 20:12:25 +0000 Subject: [Emacs-ada-mode] Indentation for extended return is off by 1 Message-ID: <02E9E63E-F03D-441D-9EAE-040A88A861CE@pushface.org> 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: extended_return_indentation.adb Type: application/octet-stream Size: 306 bytes Desc: not available URL: