Variable: f90-font-lock-keywords-2
f90-font-lock-keywords-2 is a variable defined in f90.el.gz.
Value
Large value
(("\\_<\\(module[ ]*procedure\\)\\_>\\([^()\n]*::\\)?[ ]*\\([^&!\n]*\\)"
(1 font-lock-keyword-face) (3 font-lock-function-name-face nil t))
(f90-typedef-matcher (1 font-lock-keyword-face)
(2 font-lock-function-name-face))
("\\_<\\(\\(?:end[ ]*\\)?interface[ ]*\\(?:assignment\\|operator\\|read\\|write\\)\\)[ ]*("
(1 font-lock-keyword-face t))
("\\_<\\(\\(?:end[ ]*\\)?\\(program\\|\\(?:module[ ]*\\)?\\(?:function\\|subroutine\\)\\|\\(?:sub\\)?module\\|associate\\|interface\\)\\|use\\|call\\)\\_>[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)?"
(1 font-lock-keyword-face) (3 font-lock-function-name-face nil t))
("\\_<\\(submodule\\)\\_>[ ]*([^)\n]+)[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)?"
(1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
("\\_<\\(use\\)[ ]*,[ ]*\\(\\(?:non_\\)?intrinsic\\)[ ]*::[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
(1 font-lock-keyword-face) (2 font-lock-keyword-face)
(3 font-lock-function-name-face))
"\\_<\\(\\(end[ ]*\\)?block[ ]*data\\|contains\\)\\_>"
("\\_<abstract[ ]*interface\\_>" (0 font-lock-keyword-face t))
("\\(&\\)[ ]*\\(!\\|$\\)" (1 font-lock-keyword-face))
("^[ 0-9]*\\(?:pure\\|elemental\\)?[ ]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|enumerator\\|generic\\|procedure\\|logical\\|double[ ]*precision\\)\\(.*::\\|[ ]*(.*)\\)?\\([^&!\n]*\\(?:&\n[^&!\n]*\\)*\\)"
(1 font-lock-type-face t) (4 font-lock-variable-name-face append))
(f90-typedec-matcher (1 font-lock-type-face)
(2 font-lock-variable-name-face))
("\\_<\\(\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|logical\\|double[ ]*precision\\|\\(?:type\\|class\\)[ ]*([ ]*\\(?:\\sw\\|\\s_\\)+[ ]*)\\)[ ]*\\)\\(function\\)\\_>[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)[ ]*\\(([^&!\n]*)\\)"
(1 font-lock-type-face t) (4 font-lock-keyword-face t)
(5 font-lock-function-name-face t) (6 'default t))
("\\_<\\(enum\\)[ ]*," (1 font-lock-keyword-face))
("\\_<\\(end[ ]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\|block\\|critical\\)\\)\\_>\\([ ]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\)?"
(1 font-lock-keyword-face) (3 font-lock-constant-face nil t))
("^[ 0-9]*\\(\\(\\(?:\\sw\\|\\s_\\)+\\)[ ]*:[ ]*\\)?\\(\\(if\\|do\\([ ]*while\\)?\\|select[ ]*\\(?:case\\|type\\)\\|where\\|forall\\|block\\|critical\\)\\)\\_>"
(2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
("\\_<\\(implicit\\)[ ]+\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|enumerator\\|procedure\\|logical\\|double[ ]*precision\\|type[ ]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ ]*"
(1 font-lock-keyword-face) (2 font-lock-type-face))
("\\_<\\(namelist\\|common\\)[ ]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/"
(1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
"\\_<else\\([ ]*if\\|where\\)?\\_>"
"\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ ]+\\)?stop\\|return\\)\\_>"
("\\_<\\(exit\\|cycle\\)[ ]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
(1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
("\\_<\\(exit\\|cycle\\)\\_>" (1 font-lock-keyword-face))
("\\_<\\(case\\)[ ]*\\(default\\|(\\)" . 1)
("\\_<\\(class\\)[ ]*default" . 1)
("\\_<\\(\\(type\\|class\\)[ ]*is\\)[ ]*("
(1 font-lock-keyword-face t))
("\\_<\\(do\\|go[ ]*to\\)\\_>[ ]*\\([0-9]+\\)"
(1 font-lock-keyword-face) (2 font-lock-constant-face))
("^[ ]*\\([0-9]+\\)[ ]*[a-z]+"
(1 font-lock-constant-face t))
("^#[ ]*\\(?:\\sw\\|\\s_\\)+" (0 font-lock-preprocessor-face t)
("\\_<defined\\_>" nil nil (0 font-lock-preprocessor-face)))
("^#" ("\\(&&\\|||\\)" nil nil (0 font-lock-constant-face t)))
("^#[ ]*define[ ]+\\(\\(?:\\sw\\|\\s_\\)+\\)("
(1 font-lock-function-name-face))
("^#[ ]*define[ ]+\\(\\(?:\\sw\\|\\s_\\)+\\)"
(1 font-lock-variable-name-face))
("^#[ ]*include[ ]+\\(<.+>\\)" (1 font-lock-string-face)))
Documentation
Highlights declarations, do-loops and other constructs.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
(defvar f90-font-lock-keywords-2
(append
f90-font-lock-keywords-1
(list
'("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face))
;; Variable declarations (avoid the real function call).
;; NB by accident (?), this correctly fontifies the "integer" in:
;; integer () function foo ()
;; because "() function foo ()" matches \\3.
;; The "pure" part does not really belong here, but was added to
;; exploit that hack.
;; The "function foo" bit is correctly fontified by keywords-1.
;; TODO ? actually check for balanced parens in that case.
'("^[ \t0-9]*\\(?:pure\\|elemental\\)?[ \t]*\
\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\
enumerator\\|generic\\|procedure\\|logical\\|double[ \t]*precision\\)\
\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\(?:&\n[^&!\n]*\\)*\\)"
(1 font-lock-type-face t) (4 font-lock-variable-name-face append))
;; Derived type/class variables.
;; TODO ? If we just highlighted the "type" part, rather than
;; "type(...)", this could be in the previous expression. And this
;; would be consistent with integer( kind=8 ), etc.
'(f90-typedec-matcher
(1 font-lock-type-face) (2 font-lock-variable-name-face))
;; "real function foo (args)". Must override previous. Note hack
;; to get "args" unhighlighted again. Might not always be right,
;; but probably better than leaving them as variables.
;; NB not explicitly handling this case:
;; integer( kind=1 ) function foo()
;; thanks to the happy accident described above.
;; Not anchored, so don't need to worry about "pure" etc.
'("\\_<\\(\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\
logical\\|double[ \t]*precision\\|\
\\(?:type\\|class\\)[ \t]*([ \t]*\\(?:\\sw\\|\\s_\\)+[ \t]*)\\)[ \t]*\\)\
\\(function\\)\\_>[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)[ \t]*\\(([^&!\n]*)\\)"
(1 font-lock-type-face t) (4 font-lock-keyword-face t)
(5 font-lock-function-name-face t) (6 'default t))
;; enum (F2003; must be followed by ", bind(C)").
'("\\_<\\(enum\\)[ \t]*," (1 font-lock-keyword-face))
;; end do, enum (F2003), if, select, where, and forall constructs.
;; block, critical (F2008).
;; Note that "block data" may get somewhat mixed up with F2008 blocks,
;; but since the former is obsolete I'm not going to worry about it.
'("\\_<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\|\
block\\|critical\\)\\)\\_>\
\\([ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)\\)?"
(1 font-lock-keyword-face) (3 font-lock-constant-face nil t))
'("^[ \t0-9]*\\(\\(\\(?:\\sw\\|\\s_\\)+\\)[ \t]*:[ \t]*\\)?\\(\\(if\\|\
do\\([ \t]*while\\)?\\|select[ \t]*\\(?:case\\|type\\)\\|where\\|\
forall\\|block\\|critical\\)\\)\\_>"
(2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
;; Implicit declaration.
'("\\_<\\(implicit\\)[ \t]+\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
\\|enumerator\\|procedure\\|\
logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t]*"
(1 font-lock-keyword-face) (2 font-lock-type-face))
'("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/"
(1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
"\\_<else\\([ \t]*if\\|where\\)?\\_>"
"\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\
return\\)\\_>"
'("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
(1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
'("\\_<\\(exit\\|cycle\\)\\_>"
(1 font-lock-keyword-face))
'("\\_<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
;; F2003 "class default".
'("\\_<\\(class\\)[ \t]*default" . 1)
;; F2003 "type is" in a "select type" block.
'("\\_<\\(\\(type\\|class\\)[ \t]*is\\)[ \t]*(" (1 font-lock-keyword-face t))
'("\\_<\\(do\\|go[ \t]*to\\)\\_>[ \t]*\\([0-9]+\\)"
(1 font-lock-keyword-face) (2 font-lock-constant-face))
;; Line numbers (lines whose first character after number is letter).
'("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t))
;; Override eg for "#include".
'("^#[ \t]*\\(?:\\sw\\|\\s_\\)+" (0 font-lock-preprocessor-face t)
("\\_<defined\\_>" nil nil (0 font-lock-preprocessor-face)))
'("^#" ("\\(&&\\|||\\)" nil nil (0 font-lock-constant-face t)))
'("^#[ \t]*define[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)(" (1 font-lock-function-name-face))
'("^#[ \t]*define[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face))
'("^#[ \t]*include[ \t]+\\(<.+>\\)" (1 font-lock-string-face))))
"Highlights declarations, do-loops and other constructs.")