comparison lisp/utils/highlight-headers.el @ 116:9f59509498e1 r20-1b10

Import from CVS: tag r20-1b10
author cvs
date Mon, 13 Aug 2007 09:23:06 +0200
parents 0293115a14e9
children 9b50b4588a93
comparison
equal deleted inserted replaced
115:f109f7dabbe2 116:9f59509498e1
37 ;; 37 ;;
38 ;; highlight-headers-regexp what makes a "special" header 38 ;; highlight-headers-regexp what makes a "special" header
39 ;; highlight-headers-citation-regexp matches lines of quoted text 39 ;; highlight-headers-citation-regexp matches lines of quoted text
40 ;; highlight-headers-citation-header-regexp matches headers for quoted text 40 ;; highlight-headers-citation-header-regexp matches headers for quoted text
41 41
42 (if (find-face 'message-headers) 42 (defgroup highlight-headers nil
43 nil 43 "Fancify rfc822 documents."
44 (make-face 'message-headers) 44 :group 'faces
45 (or (face-differs-from-default-p 'message-headers) 45 :group 'mail
46 (copy-face 'bold 'message-headers))) 46 :group 'news)
47 47
48 (if (find-face 'message-header-contents) 48 (defface message-headers '((t (:bold t)))
49 nil 49 "Face used for header part before colon."
50 (make-face 'message-header-contents) 50 :group 'highlight-headers)
51 (or (face-differs-from-default-p 'message-header-contents) 51
52 (copy-face 'italic 'message-header-contents))) 52 (defface message-header-contents '((t (:italic t)))
53 53 "Face used for header part after colon."
54 (if (find-face 'message-highlighted-header-contents) 54 :group 'highlight-headers)
55 nil 55
56 (make-face 'message-highlighted-header-contents) 56 (defface message-highlighted-header-contents '((t (:italic t :bold t)))
57 (or (face-differs-from-default-p 'message-highlighted-header-contents) 57 "Face used for contents of \"special\" headers."
58 (progn 58 :group 'highlight-headers)
59 (copy-face 'message-header-contents 59
60 'message-highlighted-header-contents) 60 (defface message-cited-text '((t (:italic t)))
61 ;; Most people seem not to like underlining, so change 61 "Face used for cited text."
62 ;; the font instead. 62 :group 'highlight-headers)
63 ;; (set-face-underline-p 'message-highlighted-header-contents t) 63
64 (or (make-face-bold 'message-highlighted-header-contents) 64 (defface x-face '((t (:background "white" :foreground "black")))
65 (make-face-unbold 'message-highlighted-header-contents) 65 "Face used for X-Face icon."
66 (make-face-italic 'message-highlighted-header-contents) 66 :group 'highlight-headers)
67 (make-face-unitalic 'message-highlighted-header-contents))
68 )))
69
70 (if (find-face 'message-cited-text)
71 nil
72 (make-face 'message-cited-text)
73 (or (face-differs-from-default-p 'message-cited-text)
74 (copy-face 'italic 'message-cited-text)))
75
76 (if (find-face 'x-face)
77 nil
78 (make-face 'x-face)
79 (or (face-differs-from-default-p 'x-face)
80 (progn
81 (copy-face 'message-highlighted-header-contents 'x-face)
82 (set-face-background 'x-face "white")
83 (set-face-foreground 'x-face "black"))))
84 67
85 ;;(condition-case nil 68 ;;(condition-case nil
86 ;; (face-name 'message-addresses) 69 ;; (face-name 'message-addresses)
87 ;; (wrong-type-argument 70 ;; (wrong-type-argument
88 ;; (make-face 'message-addresses) 71 ;; (make-face 'message-addresses)