changeset 20277:b7f5af6127d5

(fortran-imenu-generic-expression): Match <type>*<mumble> and un-named block data, allow some continuations.
author Dave Love <fx@gnu.org>
date Tue, 18 Nov 1997 23:21:34 +0000
parents b53b022d2239
children 17c72edb5980
files lisp/progmodes/fortran.el
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el	Tue Nov 18 23:05:21 1997 +0000
+++ b/lisp/progmodes/fortran.el	Tue Nov 18 23:21:34 1997 +0000
@@ -370,19 +370,23 @@
   "Default expressions to highlight in Fortran mode.")
 
 (defvar fortran-imenu-generic-expression
-    (list
-     (list
-      nil
-      ;; Lines are: 1. leading whitespace; 2. function declaration
-      ;; with optional type, e.g. `real', `double precision', [which
-      ;; will be fooled by `end function' allowed by G77]; 3. untyped
-      ;; declarations; 4. the name to index.
+  ;; These patterns could be confused by sequence nos. in cols 72+ and
+  ;; don't allow continuations everywhere.
+  '((nil
+     ;; Lines below are: 1. leading whitespace; 2. function
+     ;; declaration with optional type, e.g. `real', `real*4',
+     ;; character(*), `double precision' and possible statement
+     ;; continuation; 3. untyped declarations; 4. the variable to
+     ;; index.  [This will be fooled by `end function' allowed by G77.
+     ;; Also, it assumes sensible whitespace is employed.]
       "^\\s-+\\(\
-\\(\\sw\\|\\s-\\)*\\<function\\|\
-subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\
+\\(\\sw\\|\\s-\\|[*()+]\\)*\\<function\\|\
+subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t+]+\
 \\(\\sw+\\)"
-      3))
-  "imenu generic expression for `imenu-ci-default-create-index-function'.")
+     3)
+    ;; Un-named block data
+    (nil "^\\s-+\\(block\\s-*data\\)\\s-*$" 1))
+  "imenu generic expression for `imenu-default-create-index-function'.")
 
 (defvar fortran-mode-map ()
   "Keymap used in Fortran mode.")