summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>1997-11-18 23:21:34 +0000
committerDave Love <fx@gnu.org>1997-11-18 23:21:34 +0000
commit240e9cda7d93f1f2dce293b0d10ab9552176bc09 (patch)
tree11db9e5abbf76c7f38832f0461dbc2e14ea385b9 /lisp
parent6beba8e0b2f1a3100f5c2bdfc4912401f542fc02 (diff)
downloademacs-240e9cda7d93f1f2dce293b0d10ab9552176bc09.tar.gz
(fortran-imenu-generic-expression): Match
<type>*<mumble> and un-named block data, allow some continuations.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/fortran.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index fdf5620584a..ae2c5ece903 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -370,19 +370,23 @@ This variable used in TAB format mode.")
"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.")