changeset 357:368d9411ae67

Highlighting HTML tags
author Adam Chlipala <adamc@hcoop.net>
date Sun, 12 Oct 2008 12:53:45 -0400
parents 383c72d11db8
children 583ca86a55a0
files src/elisp/urweb-mode.el
diffstat 1 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/elisp/urweb-mode.el	Sun Oct 12 12:21:54 2008 -0400
+++ b/src/elisp/urweb-mode.el	Sun Oct 12 12:53:45 2008 -0400
@@ -162,10 +162,10 @@
 
 (defconst urweb-font-lock-keywords
   `(;;(urweb-font-comments-and-strings)
-    (,(concat "\\<\\(fun\\|and\\)\\s-+\\(\\sw+\\)\\s-+[^ \t\n=]")
+    ("\\<\\(fun\\|and\\)\\s-+\\(\\sw+\\)\\s-+[^ \t\n=]"
      (1 font-lock-keyword-face)
      (2 font-lock-function-name-face))
-    (,(concat "\\<\\(\\(data\\)?type\\|con\\|class\\)\\s-+\\(\\sw+\\)")
+    ("\\<\\(\\(data\\)?type\\|con\\|class\\)\\s-+\\(\\sw+\\)"
      (1 font-lock-keyword-face)
      (3 font-lock-type-def-face))
     ("\\<\\(val\\|table\\|sequence\\)\\s-+\\(\\sw+\\>\\s-*\\)?\\(\\sw+\\)\\s-*[=:]"
@@ -177,6 +177,11 @@
     ("\\<\\(signature\\)\\s-+\\(\\sw+\\)"
      (1 font-lock-keyword-face)
      (2 font-lock-interface-def-face))
+
+    ("<\\(\\sw+\\)[^>]*>"
+     (1 font-lock-tag-face))
+    ("</\\(\\sw+\\)[^>]*>"
+     (1 font-lock-tag-face))
     
     (,urweb-keywords-regexp . font-lock-keyword-face)
     (,urweb-sql-keywords-regexp . font-lock-sql-face)
@@ -212,13 +217,6 @@
 (defvar font-lock-sql-face 'font-lock-sql-face
   "Face name to use for SQL keywords.")
 
-;(defface font-lock-variable-face
-;  '((t (:foreground "green")))
-;  "Font Lock mode face used to highlight lowercase identifiers."
-;  :group 'font-lock-highlighting-faces)
-;(defvar font-lock-variable-face 'font-lock-variable-face
-;  "Face name to use for lowercase identifiers.")
-
 (defface font-lock-cvariable-face
   '((t (:foreground "dark blue")))
   "Font Lock mode face used to highlight capitalized identifiers."
@@ -226,6 +224,13 @@
 (defvar font-lock-cvariable-face 'font-lock-cvariable-face
   "Face name to use for capitalized identifiers.")
 
+(defface font-lock-tag-face
+  '((t (:bold t)))
+  "Font Lock mode face used to highlight XML tags."
+  :group 'font-lock-highlighting-faces)
+(defvar font-lock-tag-face 'font-lock-tag-face
+  "Face name to use for XML tags.")
+
 ;;
 ;; Code to handle nested comments and unusual string escape sequences
 ;;