]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix highlighting of "Exit*" phrases in f90-mode
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 4 Dec 2021 04:07:41 +0000 (05:07 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 4 Dec 2021 04:07:41 +0000 (05:07 +0100)
* lisp/progmodes/f90.el (f90-font-lock-keywords-2): Don't
highlight phrases that start with "Exit" as an exit statement
(bug#14442).

lisp/progmodes/f90.el

index acc0d96ea5bb3222accf50c57e81576f9c483bbc..eb6da20ff7f9609ba4008cc09f97d604e9f8f8ec 100644 (file)
@@ -647,7 +647,7 @@ 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\\)\
+    '("\\_<\\(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))
@@ -657,8 +657,10 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t
     '("\\(&\\)[ \t]*\\(!\\|$\\)"  (1 font-lock-keyword-face))
     "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\
 return\\)\\_>"
-    '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
+    '("\\_<\\(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)