Debian Codegraph @

mew-vars3.el

raw
1 ;;; mew-vars3.el
2
3 ;; Author: Kazu Yamamoto <[email protected]>
4 ;; Created: May 10, 2006
5
6 ;;; Code:
7
8 (eval-when-compile
9 (require 'mew-env))
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;
13 ;;; Macro
14 ;;;
15
16 (defvar mew-face-spec-alist
17 '((:tty (type tty))
18 (:light (background light))
19 (:dark (background dark))))
20
21 ;; See also mew-header-color-base
22
23 (defun mew-face-make-spec (bold &rest spec)
24 (let (ret key col)
25 (if (and bold (not (member :tty spec)))
26 (setq ret (cons (mew-face-spec-func '((class color) (type tty))
27 (mew-face-spec-primitive nil t))
28 ret)))
29 (while spec
30 (setq key (car spec))
31 (setq spec (cdr spec))
32 (setq col (car spec))
33 (setq spec (cdr spec))
34 (setq ret (cons
35 (mew-face-spec-func
36 (list '(class color)
37 (mew-alist-get-value (assoc key mew-face-spec-alist)))
38 (mew-face-spec-primitive col bold))
39 ret)))
40 (setq ret (cons (mew-face-spec-func t (mew-face-spec-primitive nil bold))
41 ret))
42 (nreverse ret)))
43
44 (defmacro mew-setface (sym &rest spec)
45 ;; (declare (indent 1))
46 `(face-spec-set
47 ',(intern (concat "mew-face-" (symbol-name sym)))
48 ',(apply 'mew-face-make-spec nil spec)))
49 (put 'mew-setface 'lisp-indent-function 1)
50
51 (defmacro mew-setface-bold (sym &rest spec)
52 ;; (declare (indent 1))
53 `(face-spec-set
54 ',(intern (concat "mew-face-" (symbol-name sym)))
55 ',(apply 'mew-face-make-spec 'bold spec)))
56 (put 'mew-setface-bold 'lisp-indent-function 1)
57
58 (defmacro mew-defface (sym doc &rest spec)
59 ;; (declare (indent 1))
60 `(defface ,(intern (concat "mew-face-" (symbol-name sym)))
61 ',(apply 'mew-face-make-spec nil spec)
62 ,(concat "*" doc)
63 :group 'mew-highlight))
64 (put 'mew-defface 'lisp-indent-function 1)
65
66 (defmacro mew-defface-bold (sym doc &rest spec)
67 ;; (declare (indent 1))
68 `(defface ,(intern (concat "mew-face-" (symbol-name sym)))
69 ',(apply 'mew-face-make-spec 'bold spec)
70 ,(concat "*" doc)
71 :group 'mew-highlight))
72 (put 'mew-defface-bold 'lisp-indent-function 1)
73
74 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
75 ;;;
76 ;;; Highlight header
77 ;;;
78
79 (mew-defface-bold header-subject
80 "Face to highlight the value of Subject:"
81 :tty "red" :light "Firebrick" :dark "OrangeRed")
82
83 (mew-defface-bold header-from
84 "Face to highlight the value of From:"
85 :tty "yellow" :light "DarkOrange4" :dark "Gold")
86
87 (mew-defface-bold header-date
88 "Face to highlight the value of Date:"
89 :tty "green" :light "ForestGreen" :dark "LimeGreen")
90
91 (mew-defface-bold header-to
92 "Face to highlight the value of To:"
93 :tty "magenta" :light "DarkViolet" :dark "violet")
94
95 (mew-defface-bold header-key
96 "Face to highlight by default"
97 :tty "green" :light "ForestGreen" :dark "LimeGreen")
98
99 (mew-defface-bold header-private
100 "Face to highlight private field-keys")
101
102 (mew-defface-bold header-important
103 "Face to highlight important field-keys"
104 :tty "cyan" :light "MediumBlue" :dark "SkyBlue")
105
106 (mew-defface-bold header-marginal
107 "Face to highlight marginal field-values"
108 :light "gray50" :dark "gray50")
109
110 (mew-defface-bold header-warning
111 "Face to highlight non-my-domain addresses on To:/Cc:/Bcc:"
112 :tty "red" :light "red" :dark "red")
113
114 (mew-defface-bold header-xmew
115 "Face to highlight the value of X-Mew:"
116 :tty "yellow" :light "chocolate" :dark"chocolate")
117
118 (mew-defface-bold header-xmew-bad
119 "Face to highlight the value of X-Mew: in bad cases"
120 :tty "red" :light "red" :dark "red")
121
122 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
123 ;;;
124 ;;; Highlight body
125 ;;;
126
127 (mew-defface body-url
128 "Face to highlight URL in Message/Draft mode"
129 :tty "red" :light "Firebrick" :dark "OrangeRed")
130
131 (mew-defface body-comment
132 "Face to highlight comments in a body"
133 :tty "blue" :light "gray50" :dark "gray50")
134
135 (mew-defface body-cite1
136 "Face to highlight the first citation"
137 :tty "green" :light "ForestGreen" :dark "LimeGreen")
138
139 (mew-defface body-cite2
140 "Face to highlight the second citation"
141 :tty "cyan" :light "MediumBlue" :dark "SkyBlue")
142
143 (mew-defface body-cite3
144 "Face to highlight the third citation"
145 :tty "magenta" :light "DarkViolet" :dark "violet")
146
147 (mew-defface body-cite4
148 "Face to highlight the forth citation"
149 :tty "yellow" :light "DarkOrange4" :dark "Gold")
150
151 (mew-defface body-cite5
152 "Face to highlight the fifth citation"
153 :tty "red" :light "Firebrick" :dark "OrangeRed")
154
155 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
156 ;;;
157 ;;; Highlight mark
158 ;;;
159
160 (mew-defface mark-review
161 "Face to highlight the review mark"
162 :tty "cyan" :light "MediumBlue" :dark "SkyBlue")
163
164 (mew-defface mark-escape
165 "Face to highlight the escape mark"
166 :tty "magenta" :light "DarkViolet" :dark "violet")
167
168 (mew-defface mark-delete
169 "Face to highlight the delete mark"
170 :tty "red" :light "Firebrick" :dark "OrangeRed")
171
172 (mew-defface mark-unlink
173 "Face to highlight the unlink mark"
174 :tty "yellow" :light "DarkOrange4" :dark "Gold")
175
176 (mew-defface mark-refile
177 "Face to highlight the refile mark"
178 :tty "green" :light "ForestGreen" :dark "LimeGreen")
179
180 (mew-defface mark-unread
181 "Face to highlight the unread mark")
182
183 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
184 ;;;
185 ;;; Highlight eof
186 ;;;
187
188 (mew-defface-bold eof-message
189 "Face to highlight the 'end of message' string"
190 :tty "green" :light "ForestGreen" :dark "LimeGreen")
191
192 (mew-defface-bold eof-part
193 "Face to highlight the 'end of part' string"
194 :tty "yellow" :light "DarkOrange4" :dark "Gold")
195
196 (provide 'mew-vars3)
197
198 ;;; Copyright Notice:
199
200 ;; Copyright (C) 1996-2015 Mew developing team.
201 ;; All rights reserved.
202
203 ;; Redistribution and use in source and binary forms, with or without
204 ;; modification, are permitted provided that the following conditions
205 ;; are met:
206 ;;
207 ;; 1. Redistributions of source code must retain the above copyright
208 ;; notice, this list of conditions and the following disclaimer.
209 ;; 2. Redistributions in binary form must reproduce the above copyright
210 ;; notice, this list of conditions and the following disclaimer in the
211 ;; documentation and/or other materials provided with the distribution.
212 ;; 3. Neither the name of the team nor the names of its contributors
213 ;; may be used to endorse or promote products derived from this software
214 ;; without specific prior written permission.
215 ;;
216 ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
217 ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
218 ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
219 ;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
220 ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
221 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
222 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
223 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
224 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
225 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
226 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
227
228 ;;; mew-vars.el ends here