Mercurial > urweb
comparison src/elisp/urweb-mode.el @ 351:d5148178a7be
Customized font faces
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 12 Oct 2008 10:22:50 -0400 |
parents | 3a1e36b14105 |
children | 2205d5cb416a |
comparison
equal
deleted
inserted
replaced
350:3a1e36b14105 | 351:d5148178a7be |
---|---|
147 (urweb-syms-re "SELECT" "FROM" "AS" "WHERE" "SQL" "GROUP" "ORDER" "BY" | 147 (urweb-syms-re "SELECT" "FROM" "AS" "WHERE" "SQL" "GROUP" "ORDER" "BY" |
148 "HAVING" "LIMIT" "OFFSET" "ALL" "UNION" "INTERSECT" "EXCEPT" | 148 "HAVING" "LIMIT" "OFFSET" "ALL" "UNION" "INTERSECT" "EXCEPT" |
149 "TRUE" "FALSE" "AND" "OR" "NOT" "COUNT" "AVG" "SUM" "MIN" "MAX" | 149 "TRUE" "FALSE" "AND" "OR" "NOT" "COUNT" "AVG" "SUM" "MIN" "MAX" |
150 "ASC" "DESC" "INSERT" "INTO" "VALUES" "UPDATE" "SET" "DELETE") | 150 "ASC" "DESC" "INSERT" "INTO" "VALUES" "UPDATE" "SET" "DELETE") |
151 "A regexp that matches SQL keywords.") | 151 "A regexp that matches SQL keywords.") |
152 | |
153 (defconst urweb-lident-regexp "\\<[a-z_][A-Za-z0-9_']*\\>" | |
154 "A regexp that matches lowercase Ur/Web identifiers.") | |
155 | |
156 (defconst urweb-cident-regexp "\\<[A-Z][A-Za-z0-9_']*\\>" | |
157 "A regexp that matches uppercase Ur/Web identifiers.") | |
152 | 158 |
153 ;;; Font-lock settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 159 ;;; Font-lock settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
154 | 160 |
155 ;; The font lock regular expressions. | 161 ;; The font lock regular expressions. |
156 | 162 |
171 ("\\<\\(signature\\)\\s-+\\(\\sw+\\)" | 177 ("\\<\\(signature\\)\\s-+\\(\\sw+\\)" |
172 (1 font-lock-keyword-face) | 178 (1 font-lock-keyword-face) |
173 (2 font-lock-interface-def-face)) | 179 (2 font-lock-interface-def-face)) |
174 | 180 |
175 (,urweb-keywords-regexp . font-lock-keyword-face) | 181 (,urweb-keywords-regexp . font-lock-keyword-face) |
176 (,urweb-sql-keywords-regexp . font-lock-sql-face)) | 182 (,urweb-sql-keywords-regexp . font-lock-sql-face) |
183 ; (,urweb-lident-regexp . font-lock-variable-face) | |
184 (,urweb-cident-regexp . font-lock-cvariable-face)) | |
177 "Regexps matching standard Ur/Web keywords.") | 185 "Regexps matching standard Ur/Web keywords.") |
178 | 186 |
179 (defface font-lock-type-def-face | 187 (defface font-lock-type-def-face |
180 '((t (:bold t))) | 188 '((t (:bold t))) |
181 "Font Lock mode face used to highlight type definitions." | 189 "Font Lock mode face used to highlight type definitions." |
201 '((t (:bold t))) | 209 '((t (:bold t))) |
202 "Font Lock mode face used to highlight SQL keywords." | 210 "Font Lock mode face used to highlight SQL keywords." |
203 :group 'font-lock-highlighting-faces) | 211 :group 'font-lock-highlighting-faces) |
204 (defvar font-lock-sql-face 'font-lock-sql-face | 212 (defvar font-lock-sql-face 'font-lock-sql-face |
205 "Face name to use for SQL keywords.") | 213 "Face name to use for SQL keywords.") |
214 | |
215 ;(defface font-lock-variable-face | |
216 ; '((t (:foreground "green"))) | |
217 ; "Font Lock mode face used to highlight lowercase identifiers." | |
218 ; :group 'font-lock-highlighting-faces) | |
219 ;(defvar font-lock-variable-face 'font-lock-variable-face | |
220 ; "Face name to use for lowercase identifiers.") | |
221 | |
222 (defface font-lock-cvariable-face | |
223 '((t (:foreground "dark blue"))) | |
224 "Font Lock mode face used to highlight capitalized identifiers." | |
225 :group 'font-lock-highlighting-faces) | |
226 (defvar font-lock-cvariable-face 'font-lock-cvariable-face | |
227 "Face name to use for capitalized identifiers.") | |
206 | 228 |
207 ;; | 229 ;; |
208 ;; Code to handle nested comments and unusual string escape sequences | 230 ;; Code to handle nested comments and unusual string escape sequences |
209 ;; | 231 ;; |
210 | 232 |