# HG changeset patch # User Adam Chlipala # Date 1223821370 14400 # Node ID d5148178a7be6a68a304162d4037eb2727627ddb # Parent 3a1e36b141056aa5cc70010a27d4fea5ab273c8e Customized font faces diff -r 3a1e36b14105 -r d5148178a7be src/elisp/urweb-defs.el --- a/src/elisp/urweb-defs.el Sun Oct 12 10:04:17 2008 -0400 +++ b/src/elisp/urweb-defs.el Sun Oct 12 10:22:50 2008 -0400 @@ -64,9 +64,9 @@ (easy-menu-define urweb-mode-menu urweb-mode-map "Menu used in `urweb-mode'." - '("URWEB" - ["URWEB mode help (brief)" describe-mode t] - ["URWEB mode *info*" urweb-mode-info t] + '("Ur/Web" + ["Ur/Web mode help (brief)" describe-mode t] + ["Ur/Web mode *info*" urweb-mode-info t] )) ;; Make's sure they appear in the menu bar when urweb-mode-map is active. diff -r 3a1e36b14105 -r d5148178a7be src/elisp/urweb-mode.el --- a/src/elisp/urweb-mode.el Sun Oct 12 10:04:17 2008 -0400 +++ b/src/elisp/urweb-mode.el Sun Oct 12 10:22:50 2008 -0400 @@ -150,6 +150,12 @@ "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 @@ (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 @@ (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 ;;