From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kester Habermann Newsgroups: gmane.emacs.bugs Subject: bug#5484: etags: fortran 90 recursive functions not recognozed. patch included Date: Wed, 27 Jan 2010 13:40:48 +0100 Message-ID: <20100127124048.GV21514@linuxtag.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0eh6TmSyL6TZE2Uz" X-Trace: ger.gmane.org 1264604947 4676 80.91.229.12 (27 Jan 2010 15:09:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jan 2010 15:09:07 +0000 (UTC) To: 5484@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 27 16:09:04 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Na9Sn-0005uZ-Al for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jan 2010 16:05:49 +0100 Original-Received: from localhost ([127.0.0.1]:42573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na9PC-0002kY-Rm for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jan 2010 10:02:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na7ei-0004OQ-SH for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 08:10:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na7ec-0004FG-Sm for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 08:10:00 -0500 Original-Received: from [199.232.76.173] (port=42274 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na7ec-0004F4-PS for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 08:09:54 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35970) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Na7eb-0004n6-UK for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 08:09:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Na7SA-00023U-CI; Wed, 27 Jan 2010 07:57:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Kester Habermann Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2010 12:57:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5484 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12645969757873 (code B ref -1); Wed, 27 Jan 2010 12:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jan 2010 12:56:15 +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 1Na7RO-00022w-Pb for submit@debbugs.gnu.org; Wed, 27 Jan 2010 07:56:14 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Na7Cg-0001tu-1p for submit@debbugs.gnu.org; Wed, 27 Jan 2010 07:41:02 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:35428) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Na7Ca-0003La-Vo for submit@debbugs.gnu.org; Wed, 27 Jan 2010 07:40:57 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Na7CZ-00080I-2X for submit@debbugs.gnu.org; Wed, 27 Jan 2010 07:40:56 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:36903) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Na7CY-00080A-SX for submit@debbugs.gnu.org; Wed, 27 Jan 2010 07:40:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na7CY-0002ct-2K for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 07:40:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na7CW-0002bw-Ja for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 07:40:53 -0500 Original-Received: from [199.232.76.173] (port=54620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na7CW-0002bq-BU for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 07:40:52 -0500 Original-Received: from mail.linuxtag.org ([91.184.37.25]:35463) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Na7CV-0007zN-Pw for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2010 07:40:52 -0500 Original-Received: by mail.linuxtag.org (Postfix, from userid 1010) id EC890DC4081; Wed, 27 Jan 2010 13:40:48 +0100 (CET) Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Wed, 27 Jan 2010 07:56:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -6.6 (------) Resent-Date: Wed, 27 Jan 2010 07:57:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 27 Jan 2010 09:59:26 -0500 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34755 Archived-At: --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, etags doesn't recognize a Fortran 90 function or subroutine if this is declared recursive. I've created a patch for etags.c (version included in emacs 23.1) that fixes the problem. As I'm not familiar with the etags source code, I'm not sure if I did it the way it should be done. For me the patch works and I have not noticed any side effects so far, please check if this makes sense to you. Example on reproducing the problem: For the included file 'foo.f90' etags will produce: TAGS: foo.f90,48 subroutine sub(1,0 integer function func(5,50 As you see, some functions and subroutines were missed. The patched version will produce: TAGS: subroutine sub(1,0 integer function func(5,50 recursive subroutine rsub(12,127 recursive integer function rfunc(16,189 recursive function rfunc2(22,278 This included all functions and subroutines. Patch 'emacs-23.1-etags.patch' included (to be applied in emacs-23.1/lib-src/) Kind Regards Kester -- Program-Co-Chair LinuxTag 2010 Free Conference Program LinuxTag 2010: Where .com meets .org - kester@linuxtag.org --0eh6TmSyL6TZE2Uz Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="emacs-23.1-etags.patch" --- etags.c.orig 2009-06-21 06:37:34.000000000 +0200 +++ etags.c 2010-01-27 13:21:07.646105000 +0100 @@ -4108,6 +4108,10 @@ dbp = skip_spaces (dbp); if (*dbp == '\0') continue; + + if (LOOKING_AT_NOCASE (dbp, "recursive")) + dbp = skip_spaces (dbp); + switch (lowcase (*dbp)) { case 'i': --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="foo.f90" subroutine sub(a) integer a end subroutine sub integer function func(a) integer a func = 0 return end function func recursive subroutine rsub(a) integer a end subroutine rsub recursive integer function rfunc(a) integer a rfunc = 0 return end function rfunc recursive function rfunc2(a) result(b) integer a integer b b = 0 return end function rfunc2 program test integer a call sub(a) end program test --0eh6TmSyL6TZE2Uz--