* bug#5484: etags: fortran 90 recursive functions not recognozed. patch included
@ 2010-01-27 12:40 Kester Habermann
2010-01-29 19:14 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Kester Habermann @ 2010-01-27 12:40 UTC (permalink / raw
To: 5484
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
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
[-- Attachment #2: emacs-23.1-etags.patch --]
[-- Type: text/x-diff, Size: 320 bytes --]
--- 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':
[-- Attachment #3: foo.f90 --]
[-- Type: text/plain, Size: 436 bytes --]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-29 19:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 12:40 bug#5484: etags: fortran 90 recursive functions not recognozed. patch included Kester Habermann
2010-01-29 19:14 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.