@@ -895,8 +895,10 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
895895
896896; ; This is for a TYPE block, not a variable of derived TYPE.
897897; ; 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.
898900(defconst f90-type-def-re
899- ; ; type word
901+ ; ; type word (includes "type is")
900902 ; ; type :: word
901903 ; ; type, attr-list :: word
902904 ; ; where attr-list = attr [, attr ...]
@@ -953,7 +955,7 @@ Used in the F90 entry in `hs-special-modes-alist'.")
953955 ; ; Avoid F2003 "type is" in "select type",
954956 ; ; and also variables of derived type "type (foo)".
955957 ; ; "type, foo" must be a block (?).
956- " type[ \t ,]\\ ("
958+ " \\ (?: type\\ |class \\ ) [ \t ,]\\ ("
957959 " [^i(!\n\" & \t ]\\ |" ; not-i(
958960 " i[^s!\n\" & \t ]\\ |" ; i not-s
959961 " is\\ (?:\\ sw\\ |\\ s_\\ )\\ )\\ |"
@@ -1452,6 +1454,7 @@ if all else fails."
14521454 (not (or (looking-at " end" )
14531455 (looking-at " \\ (do\\ |if\\ |else\\ (if\\ |where\\ )?\
14541456\\ |select[ \t ]*\\ (case\\ |type\\ )\\ |case\\ |where\\ |forall\\ |\
1457+ \\ (?:class\\ |type\\ )[ \t ]*is\\ |\
14551458block\\ |critical\\ |enum\\ |associate\\ )\\ _>" )
14561459 (looking-at " \\ (program\\ |\\ (?:sub\\ )?module\\ |\
14571460\\ (?:abstract[ \t ]*\\ )?interface\\ |block[ \t ]*data\\ )\\ _>" )
0 commit comments