From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Wright Newsgroups: gmane.emacs.bugs Subject: bug#10572: Indentation for extended return is off by 1 Date: Fri, 20 Jan 2012 20:12:25 +0000 Message-ID: <02E9E63E-F03D-441D-9EAE-040A88A861CE@pushface.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/mixed; boundary="Apple-Mail=_C6453032-BB13-4EAB-983E-9FADCD88A318" X-Trace: dough.gmane.org 1327128252 6251 80.91.229.12 (21 Jan 2012 06:44:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2012 06:44:12 +0000 (UTC) To: 10572@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 21 07:44:08 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RoUgI-0001er-KW for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jan 2012 07:44:06 +0100 Original-Received: from localhost ([::1]:60871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUgH-0000gB-L3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jan 2012 01:44:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUgE-0000g2-Qv for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:44:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoUgD-0001eF-Ni for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:44:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUgD-0001dx-M7 for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:44:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RoUgE-0008Jh-9a for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simon Wright Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2012 06:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10572 X-GNU-PR-Package: emacs, ada-mode X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132712820031901 (code B ref -1); Sat, 21 Jan 2012 06:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2012 06:43:20 +0000 Original-Received: from localhost ([127.0.0.1]:38129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoUfX-0008IT-Rn for submit@debbugs.gnu.org; Sat, 21 Jan 2012 01:43:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49134) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoUfV-0008IG-5u for submit@debbugs.gnu.org; Sat, 21 Jan 2012 01:43:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoUfN-0001JS-Oa for submit@debbugs.gnu.org; Sat, 21 Jan 2012 01:43:10 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:58128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUfN-0001JO-NC for submit@debbugs.gnu.org; Sat, 21 Jan 2012 01:43:09 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUfM-0000f6-OE for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:43:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoUfL-0001JD-VW for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:43:08 -0500 Original-Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:43464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoUfL-0001J8-Jp for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2012 01:43:07 -0500 Original-Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120121064304.LXSK27245.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Sat, 21 Jan 2012 06:43:04 +0000 Original-Received: from [192.168.1.3] (really [82.30.107.66]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120121064303.VKLS23925.aamtaout04-winn.ispmail.ntl.com@[192.168.1.3]>; Sat, 21 Jan 2012 06:43:03 +0000 X-Mailer: Apple Mail (2.1251.1) X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=yG21A6iH_HQA:10 a=yIIfz7xmxtgA:10 a=85DeUwimqa4VtYP51tMA:9 a=CjuIK1q_8ugA:10 a=1GcX09PVl8XJqofQ13kA:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55883 Archived-At: --Apple-Mail=_C6453032-BB13-4EAB-983E-9FADCD88A318 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. --Apple-Mail=_C6453032-BB13-4EAB-983E-9FADCD88A318 Content-Disposition: attachment; filename=extended_return_indentation.adb Content-Type: application/octet-stream; name="extended_return_indentation.adb" Content-Transfer-Encoding: 7bit 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; --Apple-Mail=_C6453032-BB13-4EAB-983E-9FADCD88A318--