Commits

Anonymous committed 309b501

2000-05-16 Andreas Jaeger <aj@suse.de>

* func-menu.el (fume-function-name-regexp-fortran90): Improved.
Patch by Michael L. Hall <hall@galt.lanl.gov>.

Comments (0)

Files changed (2)

+2000-05-16  Andreas Jaeger  <aj@suse.de>
+
+	* func-menu.el (fume-function-name-regexp-fortran90): Improved.
+	Patch by Michael L. Hall <hall@galt.lanl.gov>.
+
 2000-04-13  Mike Woolley <mike@ariel.co.uk>
 
 	* desktop.el (desktop-internal-v2s): Handle character correctly.
 ;;; John Turner <turner@xdiv.lanl.gov>
 (defvar fume-function-name-regexp-fortran90
   (concat
-   ;; type specs
-   "[a-zA-Z0-9*]*\\s-*"
-   ;; function or subroutine
-   "\\(entry\\|ENTRY\\|function\\|FUNCTION\\|module\\|MODULE\\|subroutine\\|SUBROUTINE\\)\\s-*"
-   )
-  "Expression to get Fortran 90 function, module and subroutine names")
+   ;; Start of big "Or" clause.
+   "\\("
+   ;; Modules -- must start at beginning of line -- this eliminates
+   ;; "module procedure" statements, which are indented.
+   "^[Mm][Oo][Dd][Uu][Ll][Ee]\\s-*"
+   ;; Or.
+   "\\|"
+   ;; Derived type definitions. This makes use of my convention to
+   ;; never leave a space between "type" and "(" when I actually use
+   ;; a derived type.
+   "^\\s-*[Tt][Yy][Pp][Ee][^(]\\s-*"
+   ;; Or.
+   "\\|"
+   ;; White space at beginning.
+   "^\\s-*"
+   ;; Type specs -- not used, because it would also include "end 
+   ;; function" lines and I don't use type specs before function 
+   ;; statements anyway. Uncomment this line if you want that behavior.
+   ;; "[a-zA-Z0-9*]*"
+   ;;
+   ;; Entry, function, subroutine, program.
+   "\\("
+   "[Ee][Nn][Tt][Rr][Yy]\\|"
+   "[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]\\|"
+   "[Ss][Uu][Bb][Rr][Oo][Uu][Tt][Ii][Nn][Ee]\\|"
+   "[Pp][Rr][Oo][Gg][Rr][Aa][Mm]"
+   "\\)\\s-*"
+   ;; End of big "Or" clause.
+   "\\)"
+  )
+  "Expression to get Fortran 90 module, type, function, and subroutine names.")
 
 ;;; Modula
 (defvar fume-function-name-regexp-modula