| 1 |
;;; mew-varsx.el --- Variables depends on other variables |
| 2 |
|
| 3 |
;; Author: Kazu Yamamoto <[email protected]> |
| 4 |
;; Created: May 10, 2006 |
| 5 |
|
| 6 |
;;; Code: |
| 7 |
|
| 8 |
(defun mew-defvar (sym val) |
| 9 |
(unless (symbol-value sym) |
| 10 |
(set sym val))) |
| 11 |
|
| 12 |
;; |
| 13 |
;; Scan |
| 14 |
;; |
| 15 |
|
| 16 |
(mew-defvar |
| 17 |
'mew-basic-folders |
| 18 |
(list mew-inbox-folder mew-draft-folder mew-queue-folder mew-postq-folder)) |
| 19 |
|
| 20 |
(mew-defvar |
| 21 |
'mew-scan-fields |
| 22 |
(list "Folder:" "Filename:" |
| 23 |
mew-subj: mew-date: mew-from: mew-to: mew-cc: |
| 24 |
mew-ct: mew-cte: mew-x-mew-uidl: |
| 25 |
mew-message-id: mew-in-reply-to: mew-references: mew-x-mew-ref: |
| 26 |
mew-x-gm-msgid: mew-x-gm-thrid: mew-x-gm-labels: |
| 27 |
mew-spam: "Body")) |
| 28 |
|
| 29 |
(mew-defvar |
| 30 |
'mew-scan-fields-alias |
| 31 |
'("FLD" "NUM" "SUBJ" "DATE" "FROM" "TO" "CC" |
| 32 |
"CT" "CTE" "UID" |
| 33 |
"ID" "IRT" "REF" "XREF" |
| 34 |
"GM-MSGID" "GM-THRID" "GM-LABELS" |
| 35 |
"SPAM" "BODY")) |
| 36 |
|
| 37 |
;; |
| 38 |
;; Office |
| 39 |
;; |
| 40 |
|
| 41 |
;; strict valid |
| 42 |
(mew-defvar |
| 43 |
'mew-regex-message-files |
| 44 |
(format "^[1-9][0-9]*\\(%s\\)?$" (regexp-quote mew-suffix))) |
| 45 |
|
| 46 |
;; strict invalid |
| 47 |
(mew-defvar |
| 48 |
'mew-regex-message-files4 |
| 49 |
(format "^0[1-9][0-9]*\\(%s\\)?$" (regexp-quote mew-suffix))) |
| 50 |
|
| 51 |
;; strict all |
| 52 |
(mew-defvar |
| 53 |
'mew-regex-message-files3 |
| 54 |
(format "^\\([0-9]+\\)\\(%s\\)?$" (regexp-quote mew-suffix))) |
| 55 |
|
| 56 |
;; mewl and grep |
| 57 |
(mew-defvar |
| 58 |
'mew-regex-message-files2 |
| 59 |
(format "^\\([0-9]+\\)\\(%s\\)?" (regexp-quote mew-suffix))) |
| 60 |
|
| 61 |
;; search |
| 62 |
(mew-defvar |
| 63 |
'mew-regex-message-files5 |
| 64 |
(format "\\([0-9]+\\)\\(%s\\)?$" (regexp-quote mew-suffix))) |
| 65 |
|
| 66 |
;; |
| 67 |
;; MIME |
| 68 |
;; |
| 69 |
|
| 70 |
|
| 71 |
(mew-defvar |
| 72 |
'mew-mime-content-type |
| 73 |
`(("multipart" nil nil nil mew-icon-multipart) |
| 74 |
;; |
| 75 |
("audio/basic" "\\.au$" mew-b64 mew-prog-audio mew-icon-audio) |
| 76 |
("audio/x-wav" "\\.wav$" mew-b64 mew-prog-audio mew-icon-audio) |
| 77 |
("audio/x-aiff" "\\.aif?f$" mew-b64 mew-prog-audio mew-icon-audio) |
| 78 |
("audio/x-midi" "\\.midi?$" mew-b64 mew-prog-audio mew-icon-audio) |
| 79 |
("audio/x-mpeg" "\\.mpga$\\|\\.mp[23]$" mew-b64 mew-prog-audio mew-icon-audio) |
| 80 |
;; |
| 81 |
("image/gif" "\\.gif$" mew-b64 mew-prog-image mew-icon-image gif) |
| 82 |
("image/tiff" "\\.tif?f$" mew-b64 mew-prog-image mew-icon-image tiff) |
| 83 |
("image/jpeg" "\\.jpe?g$" mew-b64 mew-prog-image mew-icon-image jpeg) |
| 84 |
("image/pjpeg" "\\.jfif$" mew-b64 mew-prog-image mew-icon-image jpeg) ;; MS |
| 85 |
("image/jpg" "^$" mew-b64 mew-prog-image mew-icon-image jpeg) ;; unofficial |
| 86 |
("image/png" "\\.png$" mew-b64 mew-prog-image mew-icon-image png) |
| 87 |
("image/x-xwd" "\\.xwd$" mew-b64 mew-prog-image mew-icon-image xwd) |
| 88 |
("image/x-xbm" "\\.xbm$" mew-b64 mew-prog-image mew-icon-image xbm) |
| 89 |
("image/x-xpm" "\\.xpm$" mew-b64 mew-prog-image mew-icon-image xpm) |
| 90 |
("image/x-bmp" "\\.bmp$" mew-b64 mew-prog-image mew-icon-image bmp) |
| 91 |
("image/bmp" "^$" mew-b64 mew-prog-image mew-icon-image bmp) ;; unofficial |
| 92 |
("image/x-pcx" "\\.pcx$" mew-b64 mew-prog-image mew-icon-image PCX) |
| 93 |
("image/x-tga" "\\.tga$" mew-b64 mew-prog-image mew-icon-image TGA) |
| 94 |
("image/vnd.ms-modi" "\\.mdi$" mew-b64 mew-prog-image mew-icon-image) |
| 95 |
("image/vnd.microsoft.icon" "\\.ico$" mew-b64 mew-prog-image mew-icon-image ICO) |
| 96 |
("image/x-portable-bitmap" "\\.pbm$" mew-b64 mew-prog-image mew-icon-image pbm) |
| 97 |
("image/x-portable-graymap" "\\.pgm$" mew-b64 mew-prog-image mew-icon-image pbm) |
| 98 |
("image/x-portable-pixmap" "\\.ppm$" mew-b64 mew-prog-image mew-icon-image pbm) |
| 99 |
("image/x-portable-anymap" "\\.pnm$" mew-b64 mew-prog-image mew-icon-image pbm) |
| 100 |
("image/x-portable-arbitrarymap" "\\.pam$" mew-b64 mew-prog-image mew-icon-image PAM) |
| 101 |
("image" "^$" mew-b64 mew-prog-image mew-icon-image) |
| 102 |
;; |
| 103 |
("model/iges" "\\.ige?s$" mew-b64 mew-prog-iges mew-icon-image) ;; xxx |
| 104 |
("model/vrml" "\\.wrl$" mew-b64 mew-prog-vrml mew-icon-image) |
| 105 |
("model/mesh" "\\.me?sh$" mew-b64 mew-prog-mesh mew-icon-image) |
| 106 |
("model" "^$" mew-b64 mew-prog-model mew-icon-image) |
| 107 |
;; |
| 108 |
("video/mpeg" "\\.mpe?g$" mew-b64 mew-prog-video mew-icon-video) |
| 109 |
("video/quicktime" "\\.mov$" mew-b64 mew-prog-video mew-icon-video) |
| 110 |
("video/x-msvideo" "\\.avi$" mew-b64 mew-prog-video mew-icon-video) |
| 111 |
;; |
| 112 |
("message/rfc822" ,(format "^[0-9]+\\(%s\\)?$" mew-suffix) nil |
| 113 |
mew-prog-rfc822 mew-icon-message/rfc822) |
| 114 |
("message/external-body" "\\.ext$" nil |
| 115 |
mew-prog-external-body mew-icon-message/external-body) |
| 116 |
("message/delivery-status" "^$" nil |
| 117 |
mew-prog-delivery-status mew-icon-text) |
| 118 |
;; |
| 119 |
("application/postscript" "\\.e?ps$" mew-qp |
| 120 |
mew-prog-postscript mew-icon-application/postscript) |
| 121 |
("application/pdf" "\\.pdf$" mew-b64 |
| 122 |
mew-prog-pdf mew-icon-application/postscript) |
| 123 |
;; Thunderbird/3.1.7 only, not registered in IANA |
| 124 |
("text/pdf" "\\.pdf$" mew-b64 |
| 125 |
mew-prog-pdf mew-icon-application/postscript) |
| 126 |
("application/octet-stream" "\\.pages$" mew-b64 |
| 127 |
mew-default-external-program mew-icon-application/octet-stream) |
| 128 |
("application/octet-stream" "\\.key$" mew-b64 |
| 129 |
mew-default-external-program mew-icon-application/octet-stream) |
| 130 |
("application/octet-stream" "\\.numbers$" mew-b64 |
| 131 |
mew-default-external-program mew-icon-application/octet-stream) |
| 132 |
("application/msword" "\\.doc$" mew-b64 |
| 133 |
mew-prog-msword mew-icon-text) |
| 134 |
("application/vnd.ms-excel" "\\.xl[st]$" mew-b64 |
| 135 |
mew-prog-msexcel mew-icon-text) |
| 136 |
("application/vnd.ms-powerpoint" "\\.ppt$" mew-b64 |
| 137 |
mew-prog-mspowerpoint mew-icon-text) |
| 138 |
("application/vnd.openxmlformats-officedocument.wordprocessingml.document" "\\.docx$" mew-b64 |
| 139 |
mew-prog-msword mew-icon-text) |
| 140 |
("application/vnd.openxmlformats-officedocument.wordprocessingml.template" "\\.dotx$" mew-b64 |
| 141 |
mew-prog-msword mew-icon-text) |
| 142 |
("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" "\\.xlsx$" mew-b64 |
| 143 |
mew-prog-msexcel mew-icon-text) |
| 144 |
("application/vnd.openxmlformats-officedocument.spreadsheetml.template" "\\.xltx$" mew-b64 |
| 145 |
mew-prog-msexcel mew-icon-text) |
| 146 |
("application/vnd.openxmlformats-officedocument.presentationml.presentation" "\\.pptx$" mew-b64 |
| 147 |
mew-prog-mspowerpoint mew-icon-text) |
| 148 |
("application/vnd.openxmlformats-officedocument.presentationml.slideshow" "\\.ppsx$" mew-b64 |
| 149 |
mew-prog-mspowerpoint mew-icon-text) |
| 150 |
("application/vnd.openxmlformats-officedocument.presentationml.template" "\\.potx$" mew-b64 |
| 151 |
mew-prog-mspowerpoint mew-icon-text) |
| 152 |
("application/vnd.openxmlformats-officedocument.presentationml.slide" "\\.sldx$" mew-b64 |
| 153 |
mew-prog-mspowerpoint mew-icon-text) |
| 154 |
("application/vnd.visio" "\\.vsd$" mew-b64 |
| 155 |
mew-prog-visio mew-icon-text) |
| 156 |
("application/ms-tnef" "\\.dat$" mew-b64 |
| 157 |
mew-prog-mstnef mew-icon-unknown) |
| 158 |
("application/rtf" "\\.rtf$" mew-b64 |
| 159 |
mew-prog-rtf mew-icon-text) |
| 160 |
("application/pgp-keys" "\\.pka$" nil |
| 161 |
mew-prog-pgp-keys mew-icon-unknown) |
| 162 |
("application/x-pkcs7-signature" "\\.p7s$" mew-b64 |
| 163 |
nil mew-icon-unknown) |
| 164 |
("application/vnd.fujitsu.oasys" "\\.oas$" mew-b64 |
| 165 |
mew-prog-oasys mew-icon-text) |
| 166 |
("application/vnd.fujitsu.oasys2" "\\.oa2$" mew-b64 |
| 167 |
mew-prog-oasys mew-icon-text) |
| 168 |
("application/vnd.fujitsu.oasys3" "\\.oa3$" mew-b64 |
| 169 |
mew-prog-oasys mew-icon-text) |
| 170 |
("application/zip" "\\.zip$" mew-b64 |
| 171 |
mew-prog-unzip mew-icon-application/octet-stream) |
| 172 |
("application/x-zip-compressed" "\\.zip$" mew-b64 |
| 173 |
mew-prog-unzip mew-icon-application/octet-stream) |
| 174 |
("application/octet-stream" |
| 175 |
"\\.tar$\\|\\.tar\\.\\|\\.jar$\\|\\.gz$\\|\\.Z$\\|\\.taz$\\|\\.tgz$\\|\\.xz$\\|\\.txz$\\|\\.lzma?$\\|\\.tlz$\\|\\.tbz$\\|\\.bz2?$\\|\\.lzh$\\|\\.bin$\\|\\.pgp$\\|\\.gpg$\\|\\.exe$\\|\\.dll$\\|\\.class$" |
| 176 |
mew-b64 mew-prog-octet-stream mew-icon-application/octet-stream) |
| 177 |
;; |
| 178 |
("text/html" "\\.html?$" nil mew-prog-html mew-icon-text) |
| 179 |
("text/enriched" "\\.rtf$" nil mew-prog-enriched mew-icon-text) |
| 180 |
("text/css" "\\.css$" nil mew-prog-text mew-icon-text) |
| 181 |
("text/sgml" "\\.sgml$" nil mew-prog-text mew-icon-text) |
| 182 |
("text/xml" "\\.xml$" nil mew-prog-xml mew-icon-text) |
| 183 |
("text/calendar" "\\.ics$" nil mew-prog-text mew-icon-text) |
| 184 |
("text/x-patch" "\\.diff$\\|\\.patch$" |
| 185 |
nil mew-prog-patch mew-icon-text) |
| 186 |
("text/plain" "\\.txt$\\|\\.c$\\|\\.h$\\|\\.el$\\|\\.diff$\\|\\.patch$" |
| 187 |
nil mew-prog-plain mew-icon-text) |
| 188 |
("text/rfc822-headers" "\\.hdr$" nil |
| 189 |
mew-prog-rfc822-headers mew-icon-message/rfc822) |
| 190 |
("text/csv" "\\.csv$" nil mew-prog-text mew-icon-text) |
| 191 |
("text" "^$" nil mew-prog-text mew-icon-text) |
| 192 |
("application/xml" "\\.xml$" mew-b64 |
| 193 |
mew-prog-xml2 mew-icon-text) |
| 194 |
;; Unknown CT: matches here. |
| 195 |
(t "^$" nil mew-prog-octet-stream mew-icon-unknown) |
| 196 |
;; Unknown suffix matches here and return the entry specified |
| 197 |
;; by mew-content-type. |
| 198 |
(nil ".*"))) |
| 199 |
|
| 200 |
(mew-defvar |
| 201 |
'mew-mime-content-type-for-ooffice |
| 202 |
'(("application/vnd.oasis.opendocument.text" "\\.odt") |
| 203 |
("application/vnd.oasis.opendocument.text-template" "\\.ott") |
| 204 |
("application/vnd.oasis.opendocument.text-web" "\\.oth") |
| 205 |
("application/vnd.oasis.opendocument.text-master" "\\.odm") |
| 206 |
("application/vnd.oasis.opendocument.graphics" "\\.odg") |
| 207 |
("application/vnd.oasis.opendocument.graphics-template" "\\.otg") |
| 208 |
("application/vnd.oasis.opendocument.presentation" "\\.odp") |
| 209 |
("application/vnd.oasis.opendocument.presentation-template" "\\.otp") |
| 210 |
("application/vnd.oasis.opendocument.spreadsheet" "\\.ods") |
| 211 |
("application/vnd.oasis.opendocument.spreadsheet-template" "\\.ots") |
| 212 |
("application/vnd.oasis.opendocument.chart" "\\.odc") |
| 213 |
("application/vnd.oasis.opendocument.chart-template" "\\.otc") |
| 214 |
("application/vnd.oasis.opendocument.image" "\\.odi") |
| 215 |
("application/vnd.oasis.opendocument.image-template" "\\.oti") |
| 216 |
("application/vnd.oasis.opendocument.formula" "\\.odf") |
| 217 |
("application/vnd.oasis.opendocument.formula-template" "\\.otf") |
| 218 |
("application/vnd.oasis.opendocument.database" "\\.odb") |
| 219 |
("application/vnd.sun.xml.writer" "\\.sxw$") |
| 220 |
("application/vnd.sun.xml.writer.template" "\\.stw$") |
| 221 |
("application/vnd.sun.xml.calc" "\\.sxc$") |
| 222 |
("application/vnd.sun.xml.calc.template" "\\.stc$") |
| 223 |
("application/vnd.sun.xml.draw" "\\.sxd$") |
| 224 |
("application/vnd.sun.xml.draw.template" "\\.std$") |
| 225 |
("application/vnd.sun.xml.impress" "\\.sxi$") |
| 226 |
("application/vnd.sun.xml.impress.template" "\\.sti$") |
| 227 |
("application/vnd.sun.xml.writer.global" "\\.sxg$") |
| 228 |
("application/vnd.sun.xml.math" "\\.sxm$"))) |
| 229 |
|
| 230 |
(when mew-mime-content-type-for-ooffice |
| 231 |
(setq mew-mime-content-type |
| 232 |
(nconc |
| 233 |
(mapcar |
| 234 |
(lambda (x) (list (nth 0 x) (nth 1 x) 'mew-b64 'mew-prog-ooffice 'mew-icon-text)) |
| 235 |
mew-mime-content-type-for-ooffice) |
| 236 |
mew-mime-content-type))) |
| 237 |
|
| 238 |
(provide 'mew-varsx) |
| 239 |
|
| 240 |
;;; Copyright Notice: |
| 241 |
|
| 242 |
;; Copyright (C) 1996-2015 Mew developing team. |
| 243 |
;; All rights reserved. |
| 244 |
|
| 245 |
;; Redistribution and use in source and binary forms, with or without |
| 246 |
;; modification, are permitted provided that the following conditions |
| 247 |
;; are met: |
| 248 |
;; |
| 249 |
;; 1. Redistributions of source code must retain the above copyright |
| 250 |
;; notice, this list of conditions and the following disclaimer. |
| 251 |
;; 2. Redistributions in binary form must reproduce the above copyright |
| 252 |
;; notice, this list of conditions and the following disclaimer in the |
| 253 |
;; documentation and/or other materials provided with the distribution. |
| 254 |
;; 3. Neither the name of the team nor the names of its contributors |
| 255 |
;; may be used to endorse or promote products derived from this software |
| 256 |
;; without specific prior written permission. |
| 257 |
;; |
| 258 |
;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND |
| 259 |
;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 260 |
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 261 |
;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE |
| 262 |
;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 263 |
;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 264 |
;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 265 |
;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 266 |
;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 267 |
;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 268 |
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 269 |
|
| 270 |
;;; mew-varsx.el ends here |