diff options
author | Glenn Morris <rgm@gnu.org> | 2016-11-27 16:05:02 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2016-11-27 16:05:02 -0800 |
commit | e46a13446a0dc68e5bc10636d9c40ce5b331efb9 (patch) | |
tree | 49562aeda927218ea0cb4d37442cb829d330cd0e /lisp/progmodes/f90.el | |
parent | 3674317311131a597dacc8920c5e1cd258ccd6d7 (diff) | |
download | emacs-e46a13446a0dc68e5bc10636d9c40ce5b331efb9.tar.gz emacs-e46a13446a0dc68e5bc10636d9c40ce5b331efb9.tar.bz2 emacs-e46a13446a0dc68e5bc10636d9c40ce5b331efb9.zip |
Improve treatment of Fortran's "class is"
* lisp/progmodes/f90.el (f90-start-block-re, f90-no-block-limit):
Handle "class is". (Bug#25039)
* test/automated/f90.el (f90-test-bug25039): New test.
Diffstat (limited to 'lisp/progmodes/f90.el')
-rw-r--r-- | lisp/progmodes/f90.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 58397530e4f..d9a34720046 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -895,8 +895,10 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") ;; This is for a TYPE block, not a variable of derived TYPE. ;; Hence no need to add CLASS for F2003. +;; Note that this also matches "type is", so you might need to use +;; f90-typeis-re as well. (defconst f90-type-def-re - ;; type word + ;; type word (includes "type is") ;; type :: word ;; type, attr-list :: word ;; where attr-list = attr [, attr ...] @@ -953,7 +955,7 @@ Used in the F90 entry in `hs-special-modes-alist'.") ;; Avoid F2003 "type is" in "select type", ;; and also variables of derived type "type (foo)". ;; "type, foo" must be a block (?). - "type[ \t,]\\(" + "\\(?:type\\|class\\)[ \t,]\\(" "[^i(!\n\"& \t]\\|" ; not-i( "i[^s!\n\"& \t]\\|" ; i not-s "is\\(?:\\sw\\|\\s_\\)\\)\\|" @@ -1452,6 +1454,7 @@ if all else fails." (not (or (looking-at "end") (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\ +\\(?:class\\|type\\)[ \t]*is\\|\ block\\|critical\\|enum\\|associate\\)\\_>") (looking-at "\\(program\\|\\(?:sub\\)?module\\|\ \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>") |