File: mew-varsx.el

package info (click to toggle)
mew-beta 7.0.50~6.6%2B0.20140902-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 4,640 kB
  • ctags: 4,784
  • sloc: lisp: 36,518; ansic: 3,597; haskell: 577; sh: 440; makefile: 414; ruby: 310; perl: 58
file content (268 lines) | stat: -rw-r--r-- 12,984 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
;;; mew-varsx.el --- Variables depends on other variables

;; Author:  Kazu Yamamoto <Kazu@Mew.org>
;; Created: May 10, 2006

;;; Code:

(defun mew-defvar (sym val)
  (unless (symbol-value sym)
    (set sym val)))

;;
;; Scan
;;

(mew-defvar
 'mew-basic-folders
 (list mew-inbox-folder mew-draft-folder mew-queue-folder mew-postq-folder))

(mew-defvar
 'mew-scan-fields
 (list "Folder:" "Filename:"
       mew-subj: mew-date: mew-from: mew-to: mew-cc:
       mew-ct: mew-cte: mew-x-mew-uidl:
       mew-message-id: mew-in-reply-to: mew-references: mew-x-mew-ref:
       mew-spam: "Body"))

(mew-defvar
 'mew-scan-fields-alias
 '("FLD" "NUM" "SUBJ" "DATE" "FROM" "TO" "CC"
   "CT" "CTE" "UID"
   "ID" "IRT" "REF" "XREF"
   "SPAM" "BODY"))

;;
;; Office
;;

;; strict valid
(mew-defvar
 'mew-regex-message-files
 (format  "^[1-9][0-9]*\\(%s\\)?$" (regexp-quote mew-suffix)))

;; strict invalid
(mew-defvar
 'mew-regex-message-files4
 (format "^0[1-9][0-9]*\\(%s\\)?$" (regexp-quote mew-suffix)))

;; strict all
(mew-defvar
 'mew-regex-message-files3
 (format "^\\([0-9]+\\)\\(%s\\)?$" (regexp-quote mew-suffix)))

;; mewl and grep
(mew-defvar
 'mew-regex-message-files2
 (format "^\\([0-9]+\\)\\(%s\\)?" (regexp-quote mew-suffix)))

;; search
(mew-defvar
 'mew-regex-message-files5
 (format  "\\([0-9]+\\)\\(%s\\)?$" (regexp-quote mew-suffix)))

;;
;; MIME
;;


(mew-defvar
 'mew-mime-content-type
 `(("multipart"    nil         nil     nil            mew-icon-multipart)
   ;;
   ("audio/basic"  "\\.au$"    mew-b64 mew-prog-audio mew-icon-audio)
   ("audio/x-wav"  "\\.wav$"   mew-b64 mew-prog-audio mew-icon-audio)
   ("audio/x-aiff" "\\.aif?f$" mew-b64 mew-prog-audio mew-icon-audio)
   ("audio/x-midi" "\\.midi?$" mew-b64 mew-prog-audio mew-icon-audio)
   ("audio/x-mpeg" "\\.mpga$\\|\\.mp[23]$" mew-b64 mew-prog-audio mew-icon-audio)
   ;;
   ("image/gif"   "\\.gif$"   mew-b64 mew-prog-image mew-icon-image gif)
   ("image/tiff"  "\\.tif?f$" mew-b64 mew-prog-image mew-icon-image tiff)
   ("image/jpeg"  "\\.jpe?g$" mew-b64 mew-prog-image mew-icon-image jpeg)
   ("image/pjpeg" "\\.jfif$"  mew-b64 mew-prog-image mew-icon-image jpeg) ;; MS
   ("image/jpg"   "^$"        mew-b64 mew-prog-image mew-icon-image jpeg) ;; unofficial
   ("image/png"   "\\.png$"   mew-b64 mew-prog-image mew-icon-image png)
   ("image/x-xwd" "\\.xwd$"   mew-b64 mew-prog-image mew-icon-image xwd)
   ("image/x-xbm" "\\.xbm$"   mew-b64 mew-prog-image mew-icon-image xbm)
   ("image/x-xpm" "\\.xpm$"   mew-b64 mew-prog-image mew-icon-image xpm)
   ("image/x-bmp" "\\.bmp$"   mew-b64 mew-prog-image mew-icon-image bmp)
   ("image/bmp"   "^$"        mew-b64 mew-prog-image mew-icon-image bmp) ;; unofficial
   ("image/x-pcx" "\\.pcx$"   mew-b64 mew-prog-image mew-icon-image PCX)
   ("image/x-tga" "\\.tga$"   mew-b64 mew-prog-image mew-icon-image TGA)
   ("image/vnd.ms-modi" "\\.mdi$" mew-b64 mew-prog-image mew-icon-image)
   ("image/vnd.microsoft.icon" "\\.ico$" mew-b64 mew-prog-image mew-icon-image ICO)
   ("image/x-portable-bitmap" "\\.pbm$" mew-b64 mew-prog-image mew-icon-image pbm)
   ("image/x-portable-graymap" "\\.pgm$" mew-b64 mew-prog-image mew-icon-image pbm)
   ("image/x-portable-pixmap" "\\.ppm$" mew-b64 mew-prog-image mew-icon-image pbm)
   ("image/x-portable-anymap" "\\.pnm$" mew-b64 mew-prog-image mew-icon-image pbm)
   ("image/x-portable-arbitrarymap" "\\.pam$" mew-b64 mew-prog-image mew-icon-image PAM)
   ("image"       "^$"        mew-b64 mew-prog-image mew-icon-image)
   ;;
   ("model/iges" "\\.ige?s$" mew-b64 mew-prog-iges  mew-icon-image) ;; xxx
   ("model/vrml" "\\.wrl$"   mew-b64 mew-prog-vrml  mew-icon-image)
   ("model/mesh" "\\.me?sh$" mew-b64 mew-prog-mesh  mew-icon-image)
   ("model"      "^$"        mew-b64 mew-prog-model mew-icon-image)
   ;;
   ("video/mpeg"      "\\.mpe?g$" mew-b64 mew-prog-video mew-icon-video)
   ("video/quicktime" "\\.mov$"   mew-b64 mew-prog-video mew-icon-video)
   ("video/x-msvideo" "\\.avi$"   mew-b64 mew-prog-video mew-icon-video)
   ;;
   ("message/rfc822"          ,(format "^[0-9]+\\(%s\\)?$" mew-suffix) nil
    mew-prog-rfc822           mew-icon-message/rfc822)
   ("message/external-body"   "\\.ext$"  nil
    mew-prog-external-body    mew-icon-message/external-body)
   ("message/delivery-status" "^$"       nil
    mew-prog-delivery-status  mew-icon-text)
   ;;
   ("application/postscript"        "\\.e?ps$" mew-qp
    mew-prog-postscript             mew-icon-application/postscript)
   ("application/pdf"               "\\.pdf$"  mew-b64
    mew-prog-pdf                    mew-icon-application/postscript)
   ;; Thunderbird/3.1.7 only, not registered in IANA
   ("text/pdf"                      "\\.pdf$"  mew-b64
    mew-prog-pdf                    mew-icon-application/postscript)
   ("application/octet-stream"      "\\.pages$"  mew-b64
    mew-default-external-program    mew-icon-application/octet-stream)
   ("application/octet-stream"      "\\.key$"  mew-b64
    mew-default-external-program    mew-icon-application/octet-stream)
   ("application/octet-stream"      "\\.numbers$"  mew-b64
    mew-default-external-program    mew-icon-application/octet-stream)
   ("application/msword"            "\\.doc$"  mew-b64
    mew-prog-msword                 mew-icon-text)
   ("application/vnd.ms-excel"      "\\.xl[st]$" mew-b64
    mew-prog-msexcel                mew-icon-text)
   ("application/vnd.ms-powerpoint" "\\.ppt$"  mew-b64
    mew-prog-mspowerpoint           mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.wordprocessingml.document" "\\.docx$" mew-b64
    mew-prog-msword                 mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.wordprocessingml.template" "\\.dotx$" mew-b64
    mew-prog-msword                 mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" "\\.xlsx$" mew-b64
    mew-prog-msexcel                mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.spreadsheetml.template" "\\.xltx$" mew-b64
    mew-prog-msexcel                mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.presentationml.presentation" "\\.pptx$" mew-b64
    mew-prog-mspowerpoint           mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.presentationml.slideshow" "\\.ppsx$" mew-b64
    mew-prog-mspowerpoint           mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.presentationml.template" "\\.potx$" mew-b64
    mew-prog-mspowerpoint           mew-icon-text)
   ("application/vnd.openxmlformats-officedocument.presentationml.slide" "\\.sldx$" mew-b64
    mew-prog-mspowerpoint           mew-icon-text)
   ("application/vnd.visio"         "\\.vsd$"  mew-b64
    mew-prog-visio                  mew-icon-text)
   ("application/ms-tnef"           "\\.dat$" mew-b64
    mew-prog-mstnef                 mew-icon-unknown)
   ("application/rtf"               "\\.rtf$" mew-b64
    mew-prog-rtf                    mew-icon-text)
   ("application/pgp-keys"          "\\.pka$"  nil
    mew-prog-pgp-keys               mew-icon-unknown)
   ("application/x-pkcs7-signature" "\\.p7s$"  mew-b64
    nil			     mew-icon-unknown)
   ("application/vnd.fujitsu.oasys" "\\.oas$"  mew-b64
    mew-prog-oasys                  mew-icon-text)
   ("application/vnd.fujitsu.oasys2" "\\.oa2$" mew-b64
    mew-prog-oasys                  mew-icon-text)
   ("application/vnd.fujitsu.oasys3" "\\.oa3$" mew-b64
    mew-prog-oasys                  mew-icon-text)
   ("application/zip"               "\\.zip$" mew-b64
    mew-prog-unzip                  mew-icon-application/octet-stream)
   ("application/x-zip-compressed"  "\\.zip$" mew-b64
    mew-prog-unzip                  mew-icon-application/octet-stream)
   ("application/octet-stream"
    "\\.tar$\\|\\.tar\\.\\|\\.jar$\\|\\.gz$\\|\\.Z$\\|\\.taz$\\|\\.tgz$\\|\\.xz$\\|\\.txz$\\|\\.lzma?$\\|\\.tlz$\\|\\.tbz$\\|\\.bz2?$\\|\\.lzh$\\|\\.bin$\\|\\.pgp$\\|\\.gpg$\\|\\.exe$\\|\\.dll$\\|\\.class$"
    mew-b64 mew-prog-octet-stream mew-icon-application/octet-stream)
   ;;
   ("text/html"     "\\.html?$" nil     mew-prog-html      mew-icon-text)
   ("text/enriched" "\\.rtf$"   nil     mew-prog-enriched  mew-icon-text)
   ("text/css"      "\\.css$"   nil     mew-prog-text      mew-icon-text)
   ("text/sgml"     "\\.sgml$"  nil     mew-prog-text      mew-icon-text)
   ("text/xml"      "\\.xml$"   nil     mew-prog-xml       mew-icon-text)
   ("text/calendar" "\\.ics$"   nil     mew-prog-text      mew-icon-text)
   ("text/x-patch"  "\\.diff$\\|\\.patch$"
    nil     mew-prog-patch      mew-icon-text)
   ("text/plain"    "\\.txt$\\|\\.c$\\|\\.h$\\|\\.el$\\|\\.diff$\\|\\.patch$"
    nil     mew-prog-plain     mew-icon-text)
   ("text/rfc822-headers" "\\.hdr$" nil
    mew-prog-rfc822-headers    mew-icon-message/rfc822)
   ("text/csv"      "\\.csv$"   nil     mew-prog-text      mew-icon-text)
   ("text"         "^$"        nil     mew-prog-text      mew-icon-text)
   ("application/xml"               "\\.xml$"  mew-b64
    mew-prog-xml2              mew-icon-text)
   ;; Unknown CT: matches here.
   (t               "^$"       nil   mew-prog-octet-stream mew-icon-unknown)
   ;; Unknown suffix matches here and return the entry specified
   ;; by mew-content-type.
   (nil             ".*")))

(mew-defvar
 'mew-mime-content-type-for-ooffice
 '(("application/vnd.oasis.opendocument.text"                  "\\.odt")
   ("application/vnd.oasis.opendocument.text-template"         "\\.ott")
   ("application/vnd.oasis.opendocument.text-web"              "\\.oth")
   ("application/vnd.oasis.opendocument.text-master"           "\\.odm")
   ("application/vnd.oasis.opendocument.graphics"              "\\.odg")
   ("application/vnd.oasis.opendocument.graphics-template"     "\\.otg")
   ("application/vnd.oasis.opendocument.presentation"          "\\.odp")
   ("application/vnd.oasis.opendocument.presentation-template" "\\.otp")
   ("application/vnd.oasis.opendocument.spreadsheet"           "\\.ods")
   ("application/vnd.oasis.opendocument.spreadsheet-template"  "\\.ots")
   ("application/vnd.oasis.opendocument.chart"                 "\\.odc")
   ("application/vnd.oasis.opendocument.chart-template"        "\\.otc")
   ("application/vnd.oasis.opendocument.image"                 "\\.odi")
   ("application/vnd.oasis.opendocument.image-template"        "\\.oti")
   ("application/vnd.oasis.opendocument.formula"               "\\.odf")
   ("application/vnd.oasis.opendocument.formula-template"      "\\.otf")
   ("application/vnd.oasis.opendocument.database"              "\\.odb")
   ("application/vnd.sun.xml.writer"           "\\.sxw$")
   ("application/vnd.sun.xml.writer.template"  "\\.stw$")
   ("application/vnd.sun.xml.calc"             "\\.sxc$")
   ("application/vnd.sun.xml.calc.template"    "\\.stc$")
   ("application/vnd.sun.xml.draw"             "\\.sxd$")
   ("application/vnd.sun.xml.draw.template"    "\\.std$")
   ("application/vnd.sun.xml.impress"          "\\.sxi$")
   ("application/vnd.sun.xml.impress.template" "\\.sti$")
   ("application/vnd.sun.xml.writer.global"    "\\.sxg$")
   ("application/vnd.sun.xml.math"             "\\.sxm$")))

(when mew-mime-content-type-for-ooffice
  (setq mew-mime-content-type
	(nconc
	 (mapcar
	  (lambda (x) (list (nth 0 x) (nth 1 x) 'mew-b64 'mew-prog-ooffice 'mew-icon-text))
	  mew-mime-content-type-for-ooffice)
	 mew-mime-content-type)))

(provide 'mew-varsx)

;;; Copyright Notice:

;; Copyright (C) 1996-2014 Mew developing team.
;; All rights reserved.

;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; 1. Redistributions of source code must retain the above copyright
;;    notice, this list of conditions and the following disclaimer.
;; 2. Redistributions in binary form must reproduce the above copyright
;;    notice, this list of conditions and the following disclaimer in the
;;    documentation and/or other materials provided with the distribution.
;; 3. Neither the name of the team nor the names of its contributors
;;    may be used to endorse or promote products derived from this software
;;    without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
;; PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

;;; mew-varsx.el ends here