# HG changeset patch # User Adam Chlipala # Date 1223926262 14400 # Node ID 465593c024ca5a26e5c4ca9530268163a7be8a3c # Parent 583ca86a55a0b9ac6b365336e3d89686c90f2a70 Reorder font-lock rules to deal better with CDATA diff -r 583ca86a55a0 -r 465593c024ca src/elisp/urweb-mode.el --- 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)) + ("\\(\\)" + (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)) - ("\\(\\)" - (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)