aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-05-11 16:11:23 +0200
committerLars Ingebrigtsen2022-05-11 16:12:35 +0200
commit45ccad3569536b018dfd9b97a5b4fd2c1a5212ea (patch)
tree41ab55cc3ccd1aad18a994e91df3321c64b5bbad
parentc874916d8d27226dcfd97ee2b78c911b0fb60e25 (diff)
downloademacs-45ccad3569536b018dfd9b97a5b4fd2c1a5212ea.tar.gz
emacs-45ccad3569536b018dfd9b97a5b4fd2c1a5212ea.zip
Fix fontification of multi-line declarations in f90-mode
* lisp/progmodes/f90.el (f90-font-lock-keywords-2): Fontify multi-line declarations (bug#17222).
-rw-r--r--lisp/progmodes/f90.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 263cd0ef296..ce8824b85c1 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -600,6 +600,7 @@ and variable-name parts, respectively."
600 (append 600 (append
601 f90-font-lock-keywords-1 601 f90-font-lock-keywords-1
602 (list 602 (list
603 '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face))
603 ;; Variable declarations (avoid the real function call). 604 ;; Variable declarations (avoid the real function call).
604 ;; NB by accident (?), this correctly fontifies the "integer" in: 605 ;; NB by accident (?), this correctly fontifies the "integer" in:
605 ;; integer () function foo () 606 ;; integer () function foo ()
@@ -611,8 +612,8 @@ and variable-name parts, respectively."
611 '("^[ \t0-9]*\\(?:pure\\|elemental\\)?[ \t]*\ 612 '("^[ \t0-9]*\\(?:pure\\|elemental\\)?[ \t]*\
612\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\ 613\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\
613enumerator\\|generic\\|procedure\\|logical\\|double[ \t]*precision\\)\ 614enumerator\\|generic\\|procedure\\|logical\\|double[ \t]*precision\\)\
614\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)" 615\\(.*::\\|[ \t]*(.*)\\)?\\(\\(?:[^&!\n]*\\(?:&\n\\)?\\)+\\)"
615 (1 font-lock-type-face t) (4 font-lock-variable-name-face t)) 616 (1 font-lock-type-face t) (4 font-lock-variable-name-face append))
616 ;; Derived type/class variables. 617 ;; Derived type/class variables.
617 ;; TODO ? If we just highlighted the "type" part, rather than 618 ;; TODO ? If we just highlighted the "type" part, rather than
618 ;; "type(...)", this could be in the previous expression. And this 619 ;; "type(...)", this could be in the previous expression. And this
@@ -654,7 +655,6 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t
654 '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/" 655 '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/"
655 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) 656 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
656 "\\_<else\\([ \t]*if\\|where\\)?\\_>" 657 "\\_<else\\([ \t]*if\\|where\\)?\\_>"
657 '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face))
658 "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\ 658 "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\
659return\\)\\_>" 659return\\)\\_>"
660 '("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>" 660 '("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"