commit 0d5680665bc12d3b23383d222a0519d6cac2864a Author: Roland Winkler Date: Thu May 21 16:45:41 2026 -0500 Etags handling of fortran files (bug#81086). * lib-src/etags.c: Tag fortran modules. Honor file extensions "f95", "f03", "f08" for fortran files. * doc/emacs/maintaining.texi: Update accordingly. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index a1825c5e515..d103e7f961f 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -3250,7 +3250,8 @@ In Erlang code, the tags are the functions, records and macros defined in the file. @item -In Fortran code, functions, subroutines and block data are tags. +In Fortran code, modules, subroutines, functions, entries and block data +are tags. @item In Go code, packages, functions, and types are tags. diff --git a/lib-src/etags.c b/lib-src/etags.c index 89462dd5e7f..f218dba2902 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -652,9 +652,10 @@ static const char Forth_help [] = constant, code, create, defer, value, variable, buffer:, field."; static const char *Fortran_suffixes [] = - { "F", "f", "f90", "for", NULL }; + { "F", "f", "for", "f90", "f95", "f03", "f08", NULL }; static const char Fortran_help [] = -"In Fortran code, functions, subroutines and block data are tags."; +"In Fortran code, modules, subroutines, functions, entries\n\ +and block data are tags."; static const char *Go_suffixes [] = {"go", NULL}; static const char Go_help [] = @@ -4567,6 +4568,10 @@ Fortran_functions (FILE *inf) continue; switch (c_tolower (*dbp)) { + case 'm': + if (nocase_tail ("module")) + F_getit (inf); + continue; case 'f': if (nocase_tail ("function")) F_getit (inf);