From: akr Date: Thu, 27 Aug 1998 16:11:29 +0000 (+0000) Subject: * ew-var.el (ew-decode-field-syntax-alist): Add few fields. X-Git-Tag: doodle-1_9_2~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=be4c9118f688a62f5f7b6b6f4114f22fa83cf420;p=elisp%2Fflim.git * ew-var.el (ew-decode-field-syntax-alist): Add few fields. * eword-decode.el (eword-decode-header): Compare decoded result to CRLF complemented version of field-body. --- diff --git a/ChangeLog b/ChangeLog index 16c4cc1..2fc87e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 1998-08-27 Tanaka Akira + * ew-var.el (ew-decode-field-syntax-alist): Add few fields. + + * eword-decode.el (eword-decode-header): Compare decoded result + to CRLF complemented version of field-body. + +1998-08-27 Tanaka Akira + * ew-dec.el (ew-decode-field-test): Search around current point as default argument when called interactive. diff --git a/ew-var.el b/ew-var.el index 7b53b7f..9a3e485 100644 --- a/ew-var.el +++ b/ew-var.el @@ -15,43 +15,106 @@ ;;; (defvar ew-decode-field-syntax-alist -'((from ew-scan-unibyte-std11 . ew:tag-mailbox+) - (sender ew-scan-unibyte-std11 . ew:tag-mailbox) - (to ew-scan-unibyte-std11 . ew:tag-address+) - (resent-to ew-scan-unibyte-std11 . ew:tag-address+) - (cc ew-scan-unibyte-std11 . ew:tag-address+) - (resent-cc ew-scan-unibyte-std11 . ew:tag-address+) - (bcc ew-scan-unibyte-std11 . ew:tag-address*) - (resent-bcc ew-scan-unibyte-std11 . ew:tag-address*) - (message-id ew-scan-unibyte-std11) - (resent-message-id ew-scan-unibyte-std11) - (in-reply-to ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*) - (references ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*) - (keywords ew-scan-unibyte-std11 . ew:tag-phrase*) - (subject ew-scan-unibyte-unstructured) - (comments ew-scan-unibyte-unstructured) - (encrypted ew-scan-unibyte-std11) - (date ew-scan-unibyte-std11) - (reply-to ew-scan-unibyte-std11 . ew:tag-address+) - (received ew-scan-unibyte-std11) - (resent-reply-to ew-scan-unibyte-std11 . ew:tag-address+) - (resent-from ew-scan-unibyte-std11 . ew:tag-mailbox+) - (resent-sender ew-scan-unibyte-std11 . ew:tag-mailbox) - (resent-date ew-scan-unibyte-std11) - (return-path ew-scan-unibyte-std11) - (mime-version ew-scan-unibyte-std11) - (content-type ew-scan-unibyte-mime) - (content-transfer-encoding ew-scan-unibyte-mime) - (content-id ew-scan-unibyte-std11) - (content-description ew-scan-unibyte-unstructured) - (content-disposition ew-scan-unibyte-mime) - (approved ew-scan-unibyte-std11 . ew:tag-address+) - (newsgroups ew-scan-unibyte-none) - (path ew-scan-unibyte-none) - (lines ew-scan-unibyte-none) - (xref ew-scan-unibyte-none) - (followup-to ew-scan-unibyte-none) -)) + '( +;;; std11 (rfc822, rfc1123) + (from ew-scan-unibyte-std11 . ew:tag-mailbox+) + (sender ew-scan-unibyte-std11 . ew:tag-mailbox) + (to ew-scan-unibyte-std11 . ew:tag-address+) + (resent-to ew-scan-unibyte-std11 . ew:tag-address+) + (cc ew-scan-unibyte-std11 . ew:tag-address+) + (resent-cc ew-scan-unibyte-std11 . ew:tag-address+) + (bcc ew-scan-unibyte-std11 . ew:tag-address*) + (resent-bcc ew-scan-unibyte-std11 . ew:tag-address*) + (message-id ew-scan-unibyte-std11) + (resent-message-id ew-scan-unibyte-std11) + (in-reply-to ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*) + (references ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*) + (keywords ew-scan-unibyte-std11 . ew:tag-phrase*) + (subject ew-scan-unibyte-unstructured) + (comments ew-scan-unibyte-unstructured) + (encrypted ew-scan-unibyte-std11) + (date ew-scan-unibyte-std11) + (reply-to ew-scan-unibyte-std11 . ew:tag-address+) + (received ew-scan-unibyte-std11) + (resent-reply-to ew-scan-unibyte-std11 . ew:tag-address+) + (resent-from ew-scan-unibyte-std11 . ew:tag-mailbox+) + (resent-sender ew-scan-unibyte-std11 . ew:tag-mailbox) + (resent-date ew-scan-unibyte-std11) + (return-path ew-scan-unibyte-std11) +;;; rfc1049 + ;; (content-type ew-scan-unibyte-std11) +;;; rfc2045 + (mime-version ew-scan-unibyte-std11) + (content-type ew-scan-unibyte-mime) + (content-transfer-encoding ew-scan-unibyte-mime) + (content-id ew-scan-unibyte-std11) + (content-description ew-scan-unibyte-unstructured) +;;; rfc2183 + (content-disposition ew-scan-unibyte-mime) +;;; rfc1864 + (content-md5 ew-scan-unibyte-none) +;;; rfc2076 + (status ew-scan-unibyte-none) +;;; draft-ietf-drums-msg-fmt-05 + ;; (date ew-scan-unibyte-std11) + ;; (from ew-scan-unibyte-std11 . ew:tag-mailbox+) + ;; (sender ew-scan-unibyte-std11 . ew:tag-mailbox) + ;; (reply-to ew-scan-unibyte-std11 . ew:tag-address+) + ;; (to ew-scan-unibyte-std11 . ew:tag-address+) + ;; (cc ew-scan-unibyte-std11 . ew:tag-address+) + ;; (bcc ew-scan-unibyte-std11 . ew:tag-address*) + ;; (message-id ew-scan-unibyte-std11) + ;; (in-reply-to ew-scan-unibyte-std11) + ;; (references ew-scan-unibyte-std11) + ;; (subject ew-scan-unibyte-unstructured) + ;; (comments ew-scan-unibyte-unstructured) + ;; (keywords ew-scan-unibyte-std11 . ew:tag-phrase*) + ;; (resent-date ew-scan-unibyte-std11) + ;; (resent-from ew-scan-unibyte-std11 . ew:tag-mailbox+) + ;; (resent-sender ew-scan-unibyte-std11 . ew:tag-mailbox) + ;; (resent-to ew-scan-unibyte-std11 . ew:tag-address+) + ;; (resent-cc ew-scan-unibyte-std11 . ew:tag-address+) + ;; (resent-bcc ew-scan-unibyte-std11 . ew:tag-address*) + ;; (resent-message-id ew-scan-unibyte-std11) + ;; (return-path ew-scan-unibyte-std11) + ;; (received ew-scan-unibyte-std11) +;;; draft-ietf-drums-mail-followup-to-00 + (mail-followup-to ew-scan-unibyte-std11 . ew:tag-mailbox+) +;;; draft-ietf-usefor-article-01 + ;; (date ew-scan-unibyte-std11) + ;; (from ew-scan-unibyte-std11 . ew:tag-mailbox+) + ;; (message-id ew-scan-unibyte-std11) + ;; (subject ew-scan-unibyte-unstructured) + (newsgroups ew-scan-unibyte-none) + (path ew-scan-unibyte-none) + (followup-to ew-scan-unibyte-none) + (expires ew-scan-unibyte-std11) + ;; (reply-to ew-scan-unibyte-std11 . ew:tag-address+) + ;; (references ew-scan-unibyte-std11 . ew:tag-phrase-msg-id*) + (control ew-scan-unibyte-none) + (distribution ew-scan-unibyte-none) + ;; (keywords ew-scan-unibyte-std11 . ew:tag-phrase*) + (summary ew-scan-unibyte-unstructured) + (approved ew-scan-unibyte-std11 . ew:tag-mailbox+) + (lines ew-scan-unibyte-none) + (xref ew-scan-unibyte-none) + (organization ew-scan-unibyte-unstructured) + (user-agent ew-scan-unibyte-mime) + (supersedes ew-scan-unibyte-std11) + (replaces ew-scan-unibyte-std11) + (replaced-by ew-scan-unibyte-std11) + (archive ew-scan-unibyte-none) +;;; draft-ietf-usefor-posted-mailed-01 + (posted-and-mailed ew-scan-unibyte-none) + (followup-host ew-scan-unibyte-none) ; news-url +;;; draft-ietf-mailext-new-fields-13 + (auto-submitted ew-scan-unibyte-mime) + ;; (supersedes ew-scan-unibyte-std11) + ;; (expires ew-scan-unibyte-std11) +;;; others + (x-face ew-scan-unibyte-none) + (x-pgp-sig ew-scan-unibyte-none) + )) (defvar ew-decode-field-default-syntax '(ew-scan-unibyte-unstructured)) diff --git a/eword-decode.el b/eword-decode.el index 5e4b6cb..077ae78 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -430,10 +430,10 @@ If SEPARATOR is not nil, it is used as header separator." p (match-end 0) field-name (buffer-substring beg (1- p)) end (std11-field-end) - field-body (buffer-substring p end) + field-body (ew-lf-crlf-to-crlf + (buffer-substring p end)) decoded (ew-decode-field - field-name - (ew-lf-crlf-to-crlf field-body))) + field-name field-body)) (unless (equal field-body decoded) (setq decoded (ew-crlf-refold decoded