changeset 359:465593c024ca

Reorder font-lock rules to deal better with CDATA
author Adam Chlipala <adamc@hcoop.net>
date Mon, 13 Oct 2008 15:31:02 -0400
parents 583ca86a55a0
children c1e96b387115
files src/elisp/urweb-mode.el
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/elisp/urweb-mode.el	Sun Oct 12 21:33:52 2008 -0400
+++ b/src/elisp/urweb-mode.el	Mon Oct 13 15:31:02 2008 -0400
@@ -181,6 +181,16 @@
 
 (defconst urweb-font-lock-keywords
   `(;;(urweb-font-comments-and-strings)
+    ("\\(<\\sw+\\)\\(\\s-\\|\\sw\\|=\\|\"[^\"]*\"\\|{[^}]*}\\)*/?\\(>\\)"
+     (1 font-lock-tag-face)
+     (3 font-lock-tag-face))
+    ("\\(</\\sw+>\\)"
+     (1 font-lock-tag-face))
+    ("\\([^<>{}]+\\)"
+     (1 (if (save-excursion (inXml 0))
+            font-lock-string-face
+          nil)))
+
     ("\\<\\(fun\\|and\\)\\s-+\\(\\sw+\\)\\s-+[^ \t\n=]"
      (1 font-lock-keyword-face)
      (2 font-lock-function-name-face))
@@ -196,16 +206,6 @@
     ("\\<\\(signature\\)\\s-+\\(\\sw+\\)"
      (1 font-lock-keyword-face)
      (2 font-lock-interface-def-face))
-
-    ("\\(<\\sw+\\)\\(\\s-\\|\\sw\\|=\\|\"[^\"]*\"\\|{[^}]*}\\)*/?\\(>\\)"
-     (1 font-lock-tag-face)
-     (3 font-lock-tag-face))
-    ("\\(</\\sw+>\\)"
-     (1 font-lock-tag-face))
-    ("\\([^<>{}]+\\)"
-     (1 (if (save-excursion (inXml 0))
-            font-lock-string-face
-          nil)))
     
     (,urweb-keywords-regexp . font-lock-keyword-face)
     (,urweb-sql-keywords-regexp . font-lock-sql-face)