3 ;;; user customizable variables.
5 (defvar ew-decode-sticked-encoded-word nil)
6 (defvar ew-decode-quoted-encoded-word nil)
7 (defvar ew-ignore-75bytes-limit nil)
8 (defvar ew-ignore-76bytes-limit nil)
9 (defvar ew-permit-sticked-comment nil)
10 (defvar ew-permit-sticked-special nil)
12 (defvar ew-parse-error-sit-for-seconds 0)
14 ;;; anonymous function to decode ground string.
15 ;; NOTE: STR is CRLF-form and it should return as CRLF-form.
16 (defvar ew-decode-us-ascii (lambda (str) (decode-coding-string str 'iso-latin-1-unix)))
19 (defvar ew-decode-field-syntax-alist
20 '(("from" ew-scan-unibyte-std11 . ew:tag-mailbox+-tok)
21 ("sender" ew-scan-unibyte-std11 . ew:tag-mailbox-tok)
22 ("to" ew-scan-unibyte-std11 . ew:tag-address+-tok)
23 ("resent-to" ew-scan-unibyte-std11 . ew:tag-address+-tok)
24 ("cc" ew-scan-unibyte-std11 . ew:tag-address+-tok)
25 ("resent-cc" ew-scan-unibyte-std11 . ew:tag-address+-tok)
26 ("bcc" ew-scan-unibyte-std11 . ew:tag-address*-tok)
27 ("resent-bcc" ew-scan-unibyte-std11 . ew:tag-address*-tok)
28 ("message-id" ew-scan-unibyte-std11)
29 ("resent-message-id" ew-scan-unibyte-std11)
30 ("in-reply-to" ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*-tok)
31 ("references" ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*-tok)
32 ("keywords" ew-scan-unibyte-std11 . ew:tag-phrase*-tok)
33 ("subject" ew-scan-unibyte-unstructured)
34 ("comments" ew-scan-unibyte-unstructured)
35 ("encrypted" ew-scan-unibyte-std11)
36 ("date" ew-scan-unibyte-std11)
37 ("reply-to" ew-scan-unibyte-std11 . ew:tag-address+-tok)
38 ("received" ew-scan-unibyte-std11)
39 ("resent-reply-to" ew-scan-unibyte-std11 . ew:tag-address+-tok)
40 ("resent-from" ew-scan-unibyte-std11 . ew:tag-mailbox+-tok)
41 ("resent-sender" ew-scan-unibyte-std11 . ew:tag-mailbox-tok)
42 ("resent-date" ew-scan-unibyte-std11)
43 ("return-path" ew-scan-unibyte-std11)
44 ("mime-version" ew-scan-unibyte-std11)
45 ("content-type" ew-scan-unibyte-mime)
46 ("content-transfer-encoding" ew-scan-unibyte-mime)
47 ("content-id" ew-scan-unibyte-mime)
48 ("content-description" ew-scan-unibyte-unstructured)
51 (defvar ew-decode-field-default-syntax '(ew-scan-unibyte-unstructured))
55 (defconst ew-token-regexp "[-!#-'*+0-9A-Z^-~]+")
56 (defconst ew-encoded-text-regexp "[!->@-~]+")
57 (defconst ew-encoded-word-regexp
58 (concat (regexp-quote "=?")
59 "\\(" ew-token-regexp "\\)"
61 "\\(" ew-token-regexp "\\)"
63 "\\(" ew-encoded-text-regexp "\\)"
66 ;;; utilities for variables.
68 (defun ew-dynamic-options ()
70 ew-decode-sticked-encoded-word
71 ew-decode-quoted-encoded-word
72 ew-ignore-75bytes-limit
73 ew-ignore-76bytes-limit
74 ew-permit-sticked-comment
75 ew-permit-sticked-special))