From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: fortran indentation bug? Date: Tue, 10 Jun 2008 19:37:34 -0400 Message-ID: <218wxcrhdt.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213141193 27067 80.91.229.12 (10 Jun 2008 23:39:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2008 23:39:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 11 01:40:36 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6DS5-0008Q0-60 for ged-emacs-devel@m.gmane.org; Wed, 11 Jun 2008 01:40:33 +0200 Original-Received: from localhost ([127.0.0.1]:38676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6DRH-0001OC-Rg for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2008 19:39:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6DRC-0001Nz-NR for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:39:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6DRA-0001Nk-IE for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:39:37 -0400 Original-Received: from [199.232.76.173] (port=34325 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6DRA-0001Nh-Bn for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:39:36 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33661) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6DRA-0004Vb-2n for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:39:36 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1K6DPC-0007Ah-Lh; Tue, 10 Jun 2008 19:37:34 -0400 X-Spook: Audiotel analyzer AMEMB Echelon Albania industrial X-Ran: 6/x0a,z9.u}60Fs1MIeft{)os)d#Gb~F3qIAK0Qjf84Abvw/.%ZubZ'Y::-)^R=ac",D}# X-Hue: red X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98900 Archived-At: Miles Bader wrote: > The following program fragment is indented by fortran-mode, with > `fortran-check-all-num-for-matching-do' set to t. > > Isn't the statement on the numbered line part of the DO body, and so > should be indented along with the body? > > DO 110 J=1,NZ > DTEMP=GRID(IEXT(J)) > DTEMP=DCOS(DTEMP*PI2) > 110 X(J)=DTEMP The numbered statement is part of the loop body, yes. I guess fortran-mode indents under the assumption that most people using numbered DO loops will use CONTINUE (as a proxy for END DO) rather than an actual code statement to close the loop, in which case the current indentation is the normal one people tend to use. I might try and change it to do a different thing for non-CONTINUEs, but it's a very old format (insert Fortran joke of your choice here). END DO has been around since 1978.