~ubuntu-branches/ubuntu/lucid/mew-beta/lucid

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