From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Tappin Newsgroups: gmane.emacs.bugs Subject: bug#8691: 23.2; In fortran 90 mode, f90-indent-subprogram gets confused by bind(c) type definitions Date: Wed, 18 May 2011 09:51:58 -0600 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1305735166 24316 80.91.229.12 (18 May 2011 16:12:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 May 2011 16:12:46 +0000 (UTC) To: 8691@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 18 18:12:41 2011 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 1QMjMU-00029O-Mi for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2011 18:12:38 +0200 Original-Received: from localhost ([::1]:56873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMjMU-0001ew-4u for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2011 12:12:38 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMjLy-0001dO-Ak for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 12:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMjLv-0006Bc-1n for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 12:12:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMjLu-0006BW-Up for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 12:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QMjLt-0004ad-U1; Wed, 18 May 2011 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James Tappin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2011 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130573512017633 (code B ref -1); Wed, 18 May 2011 16:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2011 16:12:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMjLr-0004aK-GC for submit@debbugs.gnu.org; Wed, 18 May 2011 12:12:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMj2f-00045I-3K for submit@debbugs.gnu.org; Wed, 18 May 2011 11:52:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMj2Y-0002uV-Sw for submit@debbugs.gnu.org; Wed, 18 May 2011 11:52:04 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:39567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMj2Y-0002uP-Qp for submit@debbugs.gnu.org; Wed, 18 May 2011 11:52:02 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMj2X-00038u-AW for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 11:52:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMj2V-0002td-Rx for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 11:52:01 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:58322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMj2V-0002tU-JY for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 11:51:59 -0400 Original-Received: by iyh42 with SMTP id 42so1885024iyh.0 for ; Wed, 18 May 2011 08:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=AZWemEGqeHVFU0Q3Mm5B0eOKVLYsy4xXIcajUuIilqA=; b=VFfe13NVYJKLpllItZzye1N21//LEKv3bAIbhyagaQwk4cBvoG5o0Mt6I1k4L77H8R 1e5mwlCCC7A1n964j5VASVolKSg2Sj8erEcMVfse8GWs0EPj2YA07Sgx60i1yBqhXli4 yM8jivKGIDRDiAX4S+43Yz0YN4xraG8SfgmC8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ltcr97GBJZEbCsbJ+LAcJZZyOKzSUTvYmokMMjPjVdq2ZpJdofmY6pupBHZz7iPb3u ntMydnlIxree1aasGWHqsZAad6DqjHIgvjoZFgZxLGNz565fa8J3h1efUVSWO+fFD9uH csgoRpAmUqIvd4U4yaPe8Re7ioVGBBp6kOHC4= Original-Received: by 10.231.189.212 with SMTP id df20mr1575081ibb.54.1305733918378; Wed, 18 May 2011 08:51:58 -0700 (PDT) Original-Received: by 10.231.17.66 with HTTP; Wed, 18 May 2011 08:51:58 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 18 May 2011 12:11:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 18 May 2011 12:12:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 18 May 2011 12:12:36 -0400 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:46556 Archived-At: In fortran 90 mode, the indentation function f90-indent-subprogram does not properly recognize type definitions with the bind(c) property. Using tab to indent line by line does work. I suspect that the presence of a double colon is causing the function to think that the line is a variable declaration. --------- Example code -------------- module demo1 use iso_c_binding implicit none type, bind(c) :: simple_struct integer(kind=c_int) :: tag1 real(kind=c_double) :: tag2 end type simple_struct contains subroutine s1(a) type(simple_struct) :: a print *, a%tag1, a%tag2 end subroutine s1 end module demo1 ---------- END Example ------------- In GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 on crested, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11001000 configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: F90 Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: e a l ( k i n d = c _ d o u b l e ) S-SPC : : S-SPC t a g 2 C-c C-w c o n t a i n s s u b r o u t i n e SPC a 1 s 1 ( a ) t y p e ( s i m p l e _ s t r i c u c t ) S-SPC : : S-SPC a ` p r i n t SPC * , SPC a % t a g 1 , SPC a % t a g 2 C-c C-w C-c C-w C-x C-s C-a C-k C-k u s e SPC i s o _ c _ b i n d i n s f g i m p l i c i t SPC n o n e C-x C-s a i n d e n t - s u b p r o b g r a m C-x C-w n o b i n d . f 9 0 2 2 C-w C-x C-s M-x r e p Recent messages: Saving file /home/james/Data/Linux/emacsbg/nbind.f90... Wrote /home/james/Data/Linux/emacsbg/nbind.f90 Auto-saving...done down-slightly: Beginning of buffer Mark set Indenting module demo2...done Saving file /home/james/Data/Linux/emacsbg/nbind.f90... Wrote /home/james/Data/Linux/emacsbg/nbind.f90 down-slightly: Beginning of buffer Making completion list... Load-path shadows: /usr/share/emacs/23.2/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x /usr/share/emacs/23.2/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp /usr/share/emacs/23.2/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex /usr/share/emacs/23.2/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style /usr/share/emacs/23.2/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik /usr/share/emacs/23.2/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp /usr/share/emacs/23.2/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info /usr/share/emacs/23.2/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex /usr/share/emacs/23.2/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font /usr/share/emacs/23.2/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold /usr/share/emacs/23.2/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf /usr/share/emacs/23.2/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar /usr/share/emacs/23.2/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt /usr/share/emacs/23.2/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex /usr/share/emacs/23.2/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex /usr/share/emacs/23.2/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context /usr/share/emacs/23.2/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl /usr/share/emacs/23.2/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en /usr/share/emacs/23.2/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite /usr/share/emacs/23.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode view apropos f90 cus-edit easymenu cus-start cus-load wid-edit preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)