summaryrefslogtreecommitdiff
path: root/src/elisp/urweb-mode.el
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-12 10:22:50 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-12 10:22:50 -0400
commite05a4f5bc55f825145a8795c682f475d735eafc4 (patch)
tree27011151b712605e24990539709501a6c486a4bf /src/elisp/urweb-mode.el
parente1f7d4b65f8c2c190c901d364db5e0c84474e00d (diff)
Customized font faces
Diffstat (limited to 'src/elisp/urweb-mode.el')
-rw-r--r--src/elisp/urweb-mode.el24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el
index d9e36665..b5e0527d 100644
--- a/src/elisp/urweb-mode.el
+++ b/src/elisp/urweb-mode.el
@@ -150,6 +150,12 @@ See doc for the variable `urweb-mode-info'."
"ASC" "DESC" "INSERT" "INTO" "VALUES" "UPDATE" "SET" "DELETE")
"A regexp that matches SQL keywords.")
+(defconst urweb-lident-regexp "\\<[a-z_][A-Za-z0-9_']*\\>"
+ "A regexp that matches lowercase Ur/Web identifiers.")
+
+(defconst urweb-cident-regexp "\\<[A-Z][A-Za-z0-9_']*\\>"
+ "A regexp that matches uppercase Ur/Web identifiers.")
+
;;; Font-lock settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The font lock regular expressions.
@@ -173,7 +179,9 @@ See doc for the variable `urweb-mode-info'."
(2 font-lock-interface-def-face))
(,urweb-keywords-regexp . font-lock-keyword-face)
- (,urweb-sql-keywords-regexp . font-lock-sql-face))
+ (,urweb-sql-keywords-regexp . font-lock-sql-face)
+; (,urweb-lident-regexp . font-lock-variable-face)
+ (,urweb-cident-regexp . font-lock-cvariable-face))
"Regexps matching standard Ur/Web keywords.")
(defface font-lock-type-def-face
@@ -204,6 +212,20 @@ See doc for the variable `urweb-mode-info'."
(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."
+ :group 'font-lock-highlighting-faces)
+(defvar font-lock-cvariable-face 'font-lock-cvariable-face
+ "Face name to use for capitalized identifiers.")
+
;;
;; Code to handle nested comments and unusual string escape sequences
;;