@@ -895,8 +895,10 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
895
895
896
896
; ; This is for a TYPE block, not a variable of derived TYPE.
897
897
; ; Hence no need to add CLASS for F2003.
898
+ ; ; Note that this also matches "type is", so you might need to use
899
+ ; ; f90-typeis-re as well.
898
900
(defconst f90-type-def-re
899
- ; ; type word
901
+ ; ; type word (includes "type is")
900
902
; ; type :: word
901
903
; ; type, attr-list :: word
902
904
; ; where attr-list = attr [, attr ...]
@@ -953,7 +955,7 @@ Used in the F90 entry in `hs-special-modes-alist'.")
953
955
; ; Avoid F2003 "type is" in "select type",
954
956
; ; and also variables of derived type "type (foo)".
955
957
; ; "type, foo" must be a block (?).
956
- " type[ \t ,]\\ ("
958
+ " \\ (?: type\\ |class \\ ) [ \t ,]\\ ("
957
959
" [^i(!\n\" & \t ]\\ |" ; not-i(
958
960
" i[^s!\n\" & \t ]\\ |" ; i not-s
959
961
" is\\ (?:\\ sw\\ |\\ s_\\ )\\ )\\ |"
@@ -1452,6 +1454,7 @@ if all else fails."
1452
1454
(not (or (looking-at " end" )
1453
1455
(looking-at " \\ (do\\ |if\\ |else\\ (if\\ |where\\ )?\
1454
1456
\\ |select[ \t ]*\\ (case\\ |type\\ )\\ |case\\ |where\\ |forall\\ |\
1457
+ \\ (?:class\\ |type\\ )[ \t ]*is\\ |\
1455
1458
block\\ |critical\\ |enum\\ |associate\\ )\\ _>" )
1456
1459
(looking-at " \\ (program\\ |\\ (?:sub\\ )?module\\ |\
1457
1460
\\ (?:abstract[ \t ]*\\ )?interface\\ |block[ \t ]*data\\ )\\ _>" )
0 commit comments