comparison lisp/gnus/message.el @ 90197:b7da78284d4c

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-65 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 425-445) - Remove "-face" suffix from gnus faces - Update from CVS - Remove "-face" suffix from MH-E faces - Remove "-face" suffix from cc-mode faces - Remove "-face" suffix from eshell faces - Remove "-face" suffix from ediff faces - Implement tty vertical-divider face - Rename vertical-divider face to vertical-border - Change escape-glyph color on dark backgrounds back to cyan - Update reference to renamed Buffer-menu-buffer face
author Miles Bader <miles@gnu.org>
date Fri, 24 Jun 2005 01:59:52 +0000
parents a1b34dec1104 53e7abe8917f
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90196:82d495f87e7b 90197:b7da78284d4c
1122 (modify-syntax-entry ?> ". " table) 1122 (modify-syntax-entry ?> ". " table)
1123 (modify-syntax-entry ?< ". " table) 1123 (modify-syntax-entry ?< ". " table)
1124 table) 1124 table)
1125 "Syntax table used while in Message mode.") 1125 "Syntax table used while in Message mode.")
1126 1126
1127 (defface message-header-to-face 1127 (defface message-header-to
1128 '((((class color) 1128 '((((class color)
1129 (background dark)) 1129 (background dark))
1130 (:foreground "green2" :bold t)) 1130 (:foreground "green2" :bold t))
1131 (((class color) 1131 (((class color)
1132 (background light)) 1132 (background light))
1133 (:foreground "MidnightBlue" :bold t)) 1133 (:foreground "MidnightBlue" :bold t))
1134 (t 1134 (t
1135 (:bold t :italic t))) 1135 (:bold t :italic t)))
1136 "Face used for displaying From headers." 1136 "Face used for displaying From headers."
1137 :group 'message-faces) 1137 :group 'message-faces)
1138 1138 ;; backward-compatibility alias
1139 (defface message-header-cc-face 1139 (put 'message-header-to-face 'face-alias 'message-header-to)
1140
1141 (defface message-header-cc
1140 '((((class color) 1142 '((((class color)
1141 (background dark)) 1143 (background dark))
1142 (:foreground "green4" :bold t)) 1144 (:foreground "green4" :bold t))
1143 (((class color) 1145 (((class color)
1144 (background light)) 1146 (background light))
1145 (:foreground "MidnightBlue")) 1147 (:foreground "MidnightBlue"))
1146 (t 1148 (t
1147 (:bold t))) 1149 (:bold t)))
1148 "Face used for displaying Cc headers." 1150 "Face used for displaying Cc headers."
1149 :group 'message-faces) 1151 :group 'message-faces)
1150 1152 ;; backward-compatibility alias
1151 (defface message-header-subject-face 1153 (put 'message-header-cc-face 'face-alias 'message-header-cc)
1154
1155 (defface message-header-subject
1152 '((((class color) 1156 '((((class color)
1153 (background dark)) 1157 (background dark))
1154 (:foreground "green3")) 1158 (:foreground "green3"))
1155 (((class color) 1159 (((class color)
1156 (background light)) 1160 (background light))
1157 (:foreground "navy blue" :bold t)) 1161 (:foreground "navy blue" :bold t))
1158 (t 1162 (t
1159 (:bold t))) 1163 (:bold t)))
1160 "Face used for displaying subject headers." 1164 "Face used for displaying subject headers."
1161 :group 'message-faces) 1165 :group 'message-faces)
1162 1166 ;; backward-compatibility alias
1163 (defface message-header-newsgroups-face 1167 (put 'message-header-subject-face 'face-alias 'message-header-subject)
1168
1169 (defface message-header-newsgroups
1164 '((((class color) 1170 '((((class color)
1165 (background dark)) 1171 (background dark))
1166 (:foreground "yellow" :bold t :italic t)) 1172 (:foreground "yellow" :bold t :italic t))
1167 (((class color) 1173 (((class color)
1168 (background light)) 1174 (background light))
1169 (:foreground "blue4" :bold t :italic t)) 1175 (:foreground "blue4" :bold t :italic t))
1170 (t 1176 (t
1171 (:bold t :italic t))) 1177 (:bold t :italic t)))
1172 "Face used for displaying newsgroups headers." 1178 "Face used for displaying newsgroups headers."
1173 :group 'message-faces) 1179 :group 'message-faces)
1174 1180 ;; backward-compatibility alias
1175 (defface message-header-other-face 1181 (put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups)
1182
1183 (defface message-header-other
1176 '((((class color) 1184 '((((class color)
1177 (background dark)) 1185 (background dark))
1178 (:foreground "#b00000")) 1186 (:foreground "#b00000"))
1179 (((class color) 1187 (((class color)
1180 (background light)) 1188 (background light))
1181 (:foreground "steel blue")) 1189 (:foreground "steel blue"))
1182 (t 1190 (t
1183 (:bold t :italic t))) 1191 (:bold t :italic t)))
1184 "Face used for displaying newsgroups headers." 1192 "Face used for displaying newsgroups headers."
1185 :group 'message-faces) 1193 :group 'message-faces)
1186 1194 ;; backward-compatibility alias
1187 (defface message-header-name-face 1195 (put 'message-header-other-face 'face-alias 'message-header-other)
1196
1197 (defface message-header-name
1188 '((((class color) 1198 '((((class color)
1189 (background dark)) 1199 (background dark))
1190 (:foreground "DarkGreen")) 1200 (:foreground "DarkGreen"))
1191 (((class color) 1201 (((class color)
1192 (background light)) 1202 (background light))
1193 (:foreground "cornflower blue")) 1203 (:foreground "cornflower blue"))
1194 (t 1204 (t
1195 (:bold t))) 1205 (:bold t)))
1196 "Face used for displaying header names." 1206 "Face used for displaying header names."
1197 :group 'message-faces) 1207 :group 'message-faces)
1198 1208 ;; backward-compatibility alias
1199 (defface message-header-xheader-face 1209 (put 'message-header-name-face 'face-alias 'message-header-name)
1210
1211 (defface message-header-xheader
1200 '((((class color) 1212 '((((class color)
1201 (background dark)) 1213 (background dark))
1202 (:foreground "blue")) 1214 (:foreground "blue"))
1203 (((class color) 1215 (((class color)
1204 (background light)) 1216 (background light))
1205 (:foreground "blue")) 1217 (:foreground "blue"))
1206 (t 1218 (t
1207 (:bold t))) 1219 (:bold t)))
1208 "Face used for displaying X-Header headers." 1220 "Face used for displaying X-Header headers."
1209 :group 'message-faces) 1221 :group 'message-faces)
1210 1222 ;; backward-compatibility alias
1211 (defface message-separator-face 1223 (put 'message-header-xheader-face 'face-alias 'message-header-xheader)
1224
1225 (defface message-separator
1212 '((((class color) 1226 '((((class color)
1213 (background dark)) 1227 (background dark))
1214 (:foreground "blue3")) 1228 (:foreground "blue3"))
1215 (((class color) 1229 (((class color)
1216 (background light)) 1230 (background light))
1217 (:foreground "brown")) 1231 (:foreground "brown"))
1218 (t 1232 (t
1219 (:bold t))) 1233 (:bold t)))
1220 "Face used for displaying the separator." 1234 "Face used for displaying the separator."
1221 :group 'message-faces) 1235 :group 'message-faces)
1222 1236 ;; backward-compatibility alias
1223 (defface message-cited-text-face 1237 (put 'message-separator-face 'face-alias 'message-separator)
1238
1239 (defface message-cited-text
1224 '((((class color) 1240 '((((class color)
1225 (background dark)) 1241 (background dark))
1226 (:foreground "red")) 1242 (:foreground "red"))
1227 (((class color) 1243 (((class color)
1228 (background light)) 1244 (background light))
1229 (:foreground "red")) 1245 (:foreground "red"))
1230 (t 1246 (t
1231 (:bold t))) 1247 (:bold t)))
1232 "Face used for displaying cited text names." 1248 "Face used for displaying cited text names."
1233 :group 'message-faces) 1249 :group 'message-faces)
1234 1250 ;; backward-compatibility alias
1235 (defface message-mml-face 1251 (put 'message-cited-text-face 'face-alias 'message-cited-text)
1252
1253 (defface message-mml
1236 '((((class color) 1254 '((((class color)
1237 (background dark)) 1255 (background dark))
1238 (:foreground "ForestGreen")) 1256 (:foreground "ForestGreen"))
1239 (((class color) 1257 (((class color)
1240 (background light)) 1258 (background light))
1241 (:foreground "ForestGreen")) 1259 (:foreground "ForestGreen"))
1242 (t 1260 (t
1243 (:bold t))) 1261 (:bold t)))
1244 "Face used for displaying MML." 1262 "Face used for displaying MML."
1245 :group 'message-faces) 1263 :group 'message-faces)
1264 ;; backward-compatibility alias
1265 (put 'message-mml-face 'face-alias 'message-mml)
1246 1266
1247 (defun message-font-lock-make-header-matcher (regexp) 1267 (defun message-font-lock-make-header-matcher (regexp)
1248 (let ((form 1268 (let ((form
1249 `(lambda (limit) 1269 `(lambda (limit)
1250 (let ((start (point))) 1270 (let ((start (point)))
1264 1284
1265 (defvar message-font-lock-keywords 1285 (defvar message-font-lock-keywords
1266 (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?")) 1286 (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
1267 `((,(message-font-lock-make-header-matcher 1287 `((,(message-font-lock-make-header-matcher
1268 (concat "^\\([Tt]o:\\)" content)) 1288 (concat "^\\([Tt]o:\\)" content))
1269 (1 'message-header-name-face) 1289 (1 'message-header-name)
1270 (2 'message-header-to-face nil t)) 1290 (2 'message-header-to nil t))
1271 (,(message-font-lock-make-header-matcher 1291 (,(message-font-lock-make-header-matcher
1272 (concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content)) 1292 (concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content))
1273 (1 'message-header-name-face) 1293 (1 'message-header-name)
1274 (2 'message-header-cc-face nil t)) 1294 (2 'message-header-cc nil t))
1275 (,(message-font-lock-make-header-matcher 1295 (,(message-font-lock-make-header-matcher
1276 (concat "^\\([Ss]ubject:\\)" content)) 1296 (concat "^\\([Ss]ubject:\\)" content))
1277 (1 'message-header-name-face) 1297 (1 'message-header-name)
1278 (2 'message-header-subject-face nil t)) 1298 (2 'message-header-subject nil t))
1279 (,(message-font-lock-make-header-matcher 1299 (,(message-font-lock-make-header-matcher
1280 (concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content)) 1300 (concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content))
1281 (1 'message-header-name-face) 1301 (1 'message-header-name)
1282 (2 'message-header-newsgroups-face nil t)) 1302 (2 'message-header-newsgroups nil t))
1283 (,(message-font-lock-make-header-matcher 1303 (,(message-font-lock-make-header-matcher
1284 (concat "^\\([A-Z][^: \n\t]+:\\)" content)) 1304 (concat "^\\([A-Z][^: \n\t]+:\\)" content))
1285 (1 'message-header-name-face) 1305 (1 'message-header-name)
1286 (2 'message-header-other-face nil t)) 1306 (2 'message-header-other nil t))
1287 (,(message-font-lock-make-header-matcher 1307 (,(message-font-lock-make-header-matcher
1288 (concat "^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" content)) 1308 (concat "^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" content))
1289 (1 'message-header-name-face) 1309 (1 'message-header-name)
1290 (2 'message-header-name-face)) 1310 (2 'message-header-name))
1291 ,@(if (and mail-header-separator 1311 ,@(if (and mail-header-separator
1292 (not (equal mail-header-separator ""))) 1312 (not (equal mail-header-separator "")))
1293 `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$") 1313 `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
1294 1 'message-separator-face)) 1314 1 'message-separator))
1295 nil) 1315 nil)
1296 ((lambda (limit) 1316 ((lambda (limit)
1297 (re-search-forward (concat "^\\(" 1317 (re-search-forward (concat "^\\("
1298 message-cite-prefix-regexp 1318 message-cite-prefix-regexp
1299 "\\).*") 1319 "\\).*")
1300 limit t)) 1320 limit t))
1301 (0 'message-cited-text-face)) 1321 (0 'message-cited-text))
1302 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" 1322 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>"
1303 (0 'message-mml-face)))) 1323 (0 'message-mml))))
1304 "Additional expressions to highlight in Message mode.") 1324 "Additional expressions to highlight in Message mode.")
1305 1325
1306 1326
1307 ;; XEmacs does it like this. For Emacs, we have to set the 1327 ;; XEmacs does it like this. For Emacs, we have to set the
1308 ;; `font-lock-defaults' buffer-local variable. 1328 ;; `font-lock-defaults' buffer-local variable.