From: akr Date: Mon, 17 Aug 1998 04:13:05 +0000 (+0000) Subject: * DOODLE-TIPS: Use `ew-decode-field' directly instead of X-Git-Tag: doodle-1_9_0~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d172c5b4e65095273156cefd01ca8f7f0b31bb0f;p=elisp%2Fflim.git * DOODLE-TIPS: Use `ew-decode-field' directly instead of `eword-decode-unstructured-field-body' and `eword-decode-and-unfold-structured-field'. * FLAM-VERSION: New file (renamed from VERSION.FLAM). * eword-decode.el (eword-decode-header): Convert CRLF to LF in a result of `ew-decode-field'. (eword-decode-structured-field-body) Ditto. (eword-decode-unstructured-field-body) Ditto. * mime.el (mime-read-field): Use `ew-decode-field' instead of `eword-decode-unstructured-field-body'. * mmbuffer.el (insert-decoded-header): Use `ew-decode-field' directly. --- diff --git a/ChangeLog b/ChangeLog index cbd8553..79f64d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,24 @@ 1998-08-17 Tanaka Akira + * DOODLE-TIPS: Use `ew-decode-field' directly instead of + `eword-decode-unstructured-field-body' and + `eword-decode-and-unfold-structured-field'. + + * FLAM-VERSION: New file (renamed from VERSION.FLAM). + + * eword-decode.el (eword-decode-header): Convert CRLF to LF in + a result of `ew-decode-field'. + (eword-decode-structured-field-body) Ditto. + (eword-decode-unstructured-field-body) Ditto. + + * mime.el (mime-read-field): Use `ew-decode-field' instead of + `eword-decode-unstructured-field-body'. + + * mmbuffer.el (insert-decoded-header): Use `ew-decode-field' + directly. + +1998-08-17 Tanaka Akira + * DOODLE-TIPS: New file. * TESTPAT: Separator of field-name and field-body is now not special. diff --git a/DOODLE-TIPS b/DOODLE-TIPS index 317c478..5d979a0 100644 --- a/DOODLE-TIPS +++ b/DOODLE-TIPS @@ -6,15 +6,17 @@ Especialy ew-line.el, ew-scan-m.el, ew-scan-s.el and ew-scan-u.el that are requi * Multiline field-bodies fetched from XOVER is already concatinated, you should set ew-ignore-76bytes-limit to true. +Currentry Gnus use these variables to decode and "Subject" and "From", +tell it here. Unless doing it, DOODLE does not decode atoms in phrase +because DOODLE cannot decide whether an atom is in phrase or not without +field name information. (setq gnus-unstructured-field-decoder (lambda (string) (let ((ew-ignore-76bytes-limit t)) - (eword-decode-unstructured-field-body - (std11-unfold-string string) - (quote must-unfold))))) + (ew-cut-cr-lf (ew-decode-field "Subject" (ew-lf-to-crlf string)))))) (setq gnus-structured-field-decoder (lambda (string) (let ((ew-ignore-76bytes-limit t)) - (eword-decode-and-unfold-structured-field string)))) + (ew-cut-cr-lf (ew-decode-field "From" (ew-lf-to-crlf string)))))) diff --git a/FLAM-VERSION b/FLAM-VERSION new file mode 100644 index 0000000..a06ade4 --- /dev/null +++ b/FLAM-VERSION @@ -0,0 +1,84 @@ +Order is not significant. + + 1 ÁÉ˧ ¤¹¤Û¤¦ 2.5R3.0/3.0 + 2 ¹ÈÇß ¤³¤¦¤Ð¤¤ 2.5R7.0/8.0 + 3 ´Ú¹È²Ö ¤«¤é¤¯¤ì¤Ê¤ð 4.0R4.0/14.0 + 4 Åí²Ö ¤â¤â 2.5R6.0/10.0 + 5 ºù ¤µ¤¯¤é 2.5R7.0/7.0 + 6 Æù ¤Ë¤¯ 2.5YR8.0/4.0 + 7 ÀÖÁÉ˧ ¤¢¤«¤¹¤Û¤¦ 7.5R4.0/14.0 + 8 ¶ä¼ë ¤®¤ó¤·¤å 5.0R4.5/13.0 + 9 àÏ¡¹Èì ¤·¤ç¤¦¤¸¤ç¤¦¤Ò 7.5R4.5/14.0 + 10 ¹ÈÈì ¤Ù¤Ë¤Ò 7.5R5.0/13.0 + 11 ²«Ã° ¤ï¤¦¤¿¤ó 10R5.5/14.0 + 12 ¿¿Èì ¤Þ¤Ò 10R6.0/11.0 + 13 [0212:52-64] ¤½¤Ò 2.5YR7.0/11.0 + 14 ³Á ¤«¤­ 10R6.5/10.0 + 15 ¿¼»Ù»Ò ¤³¤­¤¯¤Á¤Ê¤· 10YR7.5/8.0 + 16 ´»»Ò ¤³¤¦¤¸ 7.5YR7.0/11.0 + 17 µàÍÕ ¤¯¤Á¤Ð 10YR7.5/10.0 + 18 ÀÖÇòÆË ¤¢¤«¤·¤í¤Ä¤ë¤Ð¤ß 5.0YR8.0/6.0 + 19 ¾®Æ¦ ¤¢¤º¤­ 2.5R3.5/5.0 + 20 ÉòƺÃã ¤¨¤Ó¤Á¤ã 5.0R4.0/11.0 + 21 ¿¿¼ë ¤·¤ó¤·¤å 2.5R4.5/10.0 + 22 ÛØÈé ¤Ò¤Ï¤À 2.0YR3.5/4.0 + 23 ¥Ù¥ó¥¬¥é ¤Ù¤ó¤¬¤é 7.5R4.0/7.0 + 24 Âåìà ¤¿¤¤¤·¤ã 10R4.5/8.0 + 25 ¾ÇÃã ¤³¤²¤Á¤ã 10R3.0/2.0 + 26 ·ªÈé ¤¯¤ê¤«¤Ï 10R3.0/4.0 + 27 ÆÐ ¤È¤Ó 10R4.0/7.0 + 28 ³÷ ¤«¤Ð 10R4.0/5.0 + 29 ²«È§À÷ ¤³¤¦¤í¤»¤ó 2.5Y5.0/4.0 + 30 Ãú»ÒÃã ¤Á¤ç¤¦¤¸¤Á¤ã 5.0YR4.0/4.0 + 31 ¼Æ ¤Õ¤· 10YR4.0/4.0 + 32 Ãú»ú ¤Á¤ç¤¦¤¸ 7.5YR6.0/6.0 + 33 ÄÓ²« ¤·¤ã¤ª¤¦ 7.5YR5.5/6.0 + 34 ¥«¡¼¥­¡¼ ¤«¡¼¤­¡¼ 10YR6.0/7.0 + 35 ·¬ ¤¯¤ï 7.5YR6.0/5.0 + 36 ²«ÆË ¤­¤Ä¤ë¤Ð¤ß 2.5Y6.5/7.0 + 37 ¹á ¤³¤¦ 10YR7.5/6.0 + 38 ²«ÅÚ ¤ª¤¦¤É 10YR7.0/7.0 + 39 »³¿á ¤ä¤Þ¤Ö¤­ 3.5Y8.0/12.0 + 40 Æ£²« ¤È¤¦¤ª¤¦ 3.0Y8.0/14.0 + 41 ݵ¶â ¤¦¤³¤ó 4.5Y8.0/12.0 + 42 ´¢°Â ¤«¤ê¤ä¤¹ 5.0Y8.0/10.0 + 43 ²«[é­/ÌÚ] ¤­¤Ï¤À 4.5Y8.0/8.0 + 44 »Ù»Ò ¤¯¤Á¤Ê¤· 3.0Y8.0/7.0 + 45 ¶Ì»Ò ¤¿¤Þ¤´ 4.0Y8.0/8.0 + 46 ó´ ¤Ò¤ï 10Y8.0/10.0 + 47 ó´Ë¨²« ¤Ò¤ï¤â¤¨¤® 5.0GY7.0/8.0 + 48 òô ¤¦¤°¤¤¤¹ 7.5GY5.5/5.0 + 49 ˨²« ¤â¤¨¤® 10GY5.5/9.0 + 50 ÎÐ ¤ß¤É¤ê 10GY4.0/6.0 + 51 ÎÐÀÄ ¤í¤¯¤·¤ç¤¦ 5.0G6.0/8.0 + 52 ÇòÎÐ ¤Ó¤ã¤¯¤í¤¯ 2.5G8.0/2.0 + 53 ¾¾ÍÕ ¤Þ¤Ä¤Ð 7.5G5.0/5.0 + 54 »³ÍõÀ¢ ¤ä¤Þ¤¢¤¤¤º¤ê 5.0BG/4.0/4.0 + 55 ³¤¾¾ ¤ß¤ë 2.5GY3.5/2.0 + 56 Õ»Ãã ¤³¤Ó¤Á¤ã 10Y4.0/2.0 + 57 ÀÄÇòÆË ¤¢¤ª¤·¤í¤Ä¤ë¤Ð¤ß 5.0GY7.5/3.0 + 58 ²Ø»Òº° ¤Ê¤¹¤³¤ó 7.5PB/2.3/3.0 + 59 º° ¤³¤ó 7.5PB3.0/3.0 + 60 Ǽ¸Í ¤Ê¤ó¤É 5.0PB3.0/4.0 + 61 º°ÀÄ ¤³¤ó¤¸¤ç¤¦ 8.5PB3.0/12.0 + 62 ΰÍþ ¤ë¤ê 7.5PB3.0/12.0 + 63 ·²ÀÄ ¤°¤ó¤¸¤ç¤¦ 6.0PB3.5/12.0 + 64 Çò·² ¤Ó¤ã¤¯¤°¤ó 7.5B6.0/4.0 + 65 åÝ ¤Ï¤Ê¤À 10B3.5/5.0 + 66 Àõ²« ¤¢¤µ¤® 10BG6.0/3.0 + 67 ÌÇ»ç ¤á¤Ã¤· 5.0P2.5/4.0 + 68 ¿¼»ç ¤³¤à¤é¤µ¤­ 5.0P2.5/4.0 + 69 ÆóÍõ ¤Õ¤¿¤¢¤¤ 5.0P4.0/3.0 + 70 »ç ¤à¤é¤µ¤­ 7.5P3.5/4.0 + 71 Éòƺ ¤¨¤Ó 7.5P3.5/6.0 + 72 ¿¼Èì ¤³¤­¤Ò 8.5R4.5/4.0 + 73 µË¹¼ ¤­¤­¤ç¤¦ 10PB3.5/10 + 74 Æ£ ¤Õ¤¸ 7.5P5.0/8.0 + 75 ²´Ã° ¤Ü¤¿¤ó 5.0RP4.5/14 + 76 ËÏ ¤¹¤ß N1.5/0 + 77 ËÏÆË ¤¯¤í¤Ä¤ë¤Ð¤ß 5.0YR3.0/0.5 + 78 ⥠¤¯¤ê 2.5YR3.0/0.5 + 79 Æß ¤Ë¤Ó 7.5R4.0/0.5 + 80 ÀÄÆß ¤¢¤ª¤Ë¤Ó 5.0B4.0/0.5 + 81 Íøµ×ÁÍ ¤ê¤­¤å¤¦¤Í¤º¤ß 5.0G4.5/0.5 + 82 ³¥ ¤Ï¤¤ 5.0GY5.0/0.5 diff --git a/VERSION.FLAM b/VERSION.FLAM deleted file mode 100644 index a06ade4..0000000 --- a/VERSION.FLAM +++ /dev/null @@ -1,84 +0,0 @@ -Order is not significant. - - 1 ÁÉ˧ ¤¹¤Û¤¦ 2.5R3.0/3.0 - 2 ¹ÈÇß ¤³¤¦¤Ð¤¤ 2.5R7.0/8.0 - 3 ´Ú¹È²Ö ¤«¤é¤¯¤ì¤Ê¤ð 4.0R4.0/14.0 - 4 Åí²Ö ¤â¤â 2.5R6.0/10.0 - 5 ºù ¤µ¤¯¤é 2.5R7.0/7.0 - 6 Æù ¤Ë¤¯ 2.5YR8.0/4.0 - 7 ÀÖÁÉ˧ ¤¢¤«¤¹¤Û¤¦ 7.5R4.0/14.0 - 8 ¶ä¼ë ¤®¤ó¤·¤å 5.0R4.5/13.0 - 9 àÏ¡¹Èì ¤·¤ç¤¦¤¸¤ç¤¦¤Ò 7.5R4.5/14.0 - 10 ¹ÈÈì ¤Ù¤Ë¤Ò 7.5R5.0/13.0 - 11 ²«Ã° ¤ï¤¦¤¿¤ó 10R5.5/14.0 - 12 ¿¿Èì ¤Þ¤Ò 10R6.0/11.0 - 13 [0212:52-64] ¤½¤Ò 2.5YR7.0/11.0 - 14 ³Á ¤«¤­ 10R6.5/10.0 - 15 ¿¼»Ù»Ò ¤³¤­¤¯¤Á¤Ê¤· 10YR7.5/8.0 - 16 ´»»Ò ¤³¤¦¤¸ 7.5YR7.0/11.0 - 17 µàÍÕ ¤¯¤Á¤Ð 10YR7.5/10.0 - 18 ÀÖÇòÆË ¤¢¤«¤·¤í¤Ä¤ë¤Ð¤ß 5.0YR8.0/6.0 - 19 ¾®Æ¦ ¤¢¤º¤­ 2.5R3.5/5.0 - 20 ÉòƺÃã ¤¨¤Ó¤Á¤ã 5.0R4.0/11.0 - 21 ¿¿¼ë ¤·¤ó¤·¤å 2.5R4.5/10.0 - 22 ÛØÈé ¤Ò¤Ï¤À 2.0YR3.5/4.0 - 23 ¥Ù¥ó¥¬¥é ¤Ù¤ó¤¬¤é 7.5R4.0/7.0 - 24 Âåìà ¤¿¤¤¤·¤ã 10R4.5/8.0 - 25 ¾ÇÃã ¤³¤²¤Á¤ã 10R3.0/2.0 - 26 ·ªÈé ¤¯¤ê¤«¤Ï 10R3.0/4.0 - 27 ÆÐ ¤È¤Ó 10R4.0/7.0 - 28 ³÷ ¤«¤Ð 10R4.0/5.0 - 29 ²«È§À÷ ¤³¤¦¤í¤»¤ó 2.5Y5.0/4.0 - 30 Ãú»ÒÃã ¤Á¤ç¤¦¤¸¤Á¤ã 5.0YR4.0/4.0 - 31 ¼Æ ¤Õ¤· 10YR4.0/4.0 - 32 Ãú»ú ¤Á¤ç¤¦¤¸ 7.5YR6.0/6.0 - 33 ÄÓ²« ¤·¤ã¤ª¤¦ 7.5YR5.5/6.0 - 34 ¥«¡¼¥­¡¼ ¤«¡¼¤­¡¼ 10YR6.0/7.0 - 35 ·¬ ¤¯¤ï 7.5YR6.0/5.0 - 36 ²«ÆË ¤­¤Ä¤ë¤Ð¤ß 2.5Y6.5/7.0 - 37 ¹á ¤³¤¦ 10YR7.5/6.0 - 38 ²«ÅÚ ¤ª¤¦¤É 10YR7.0/7.0 - 39 »³¿á ¤ä¤Þ¤Ö¤­ 3.5Y8.0/12.0 - 40 Æ£²« ¤È¤¦¤ª¤¦ 3.0Y8.0/14.0 - 41 ݵ¶â ¤¦¤³¤ó 4.5Y8.0/12.0 - 42 ´¢°Â ¤«¤ê¤ä¤¹ 5.0Y8.0/10.0 - 43 ²«[é­/ÌÚ] ¤­¤Ï¤À 4.5Y8.0/8.0 - 44 »Ù»Ò ¤¯¤Á¤Ê¤· 3.0Y8.0/7.0 - 45 ¶Ì»Ò ¤¿¤Þ¤´ 4.0Y8.0/8.0 - 46 ó´ ¤Ò¤ï 10Y8.0/10.0 - 47 ó´Ë¨²« ¤Ò¤ï¤â¤¨¤® 5.0GY7.0/8.0 - 48 òô ¤¦¤°¤¤¤¹ 7.5GY5.5/5.0 - 49 ˨²« ¤â¤¨¤® 10GY5.5/9.0 - 50 ÎÐ ¤ß¤É¤ê 10GY4.0/6.0 - 51 ÎÐÀÄ ¤í¤¯¤·¤ç¤¦ 5.0G6.0/8.0 - 52 ÇòÎÐ ¤Ó¤ã¤¯¤í¤¯ 2.5G8.0/2.0 - 53 ¾¾ÍÕ ¤Þ¤Ä¤Ð 7.5G5.0/5.0 - 54 »³ÍõÀ¢ ¤ä¤Þ¤¢¤¤¤º¤ê 5.0BG/4.0/4.0 - 55 ³¤¾¾ ¤ß¤ë 2.5GY3.5/2.0 - 56 Õ»Ãã ¤³¤Ó¤Á¤ã 10Y4.0/2.0 - 57 ÀÄÇòÆË ¤¢¤ª¤·¤í¤Ä¤ë¤Ð¤ß 5.0GY7.5/3.0 - 58 ²Ø»Òº° ¤Ê¤¹¤³¤ó 7.5PB/2.3/3.0 - 59 º° ¤³¤ó 7.5PB3.0/3.0 - 60 Ǽ¸Í ¤Ê¤ó¤É 5.0PB3.0/4.0 - 61 º°ÀÄ ¤³¤ó¤¸¤ç¤¦ 8.5PB3.0/12.0 - 62 ΰÍþ ¤ë¤ê 7.5PB3.0/12.0 - 63 ·²ÀÄ ¤°¤ó¤¸¤ç¤¦ 6.0PB3.5/12.0 - 64 Çò·² ¤Ó¤ã¤¯¤°¤ó 7.5B6.0/4.0 - 65 åÝ ¤Ï¤Ê¤À 10B3.5/5.0 - 66 Àõ²« ¤¢¤µ¤® 10BG6.0/3.0 - 67 ÌÇ»ç ¤á¤Ã¤· 5.0P2.5/4.0 - 68 ¿¼»ç ¤³¤à¤é¤µ¤­ 5.0P2.5/4.0 - 69 ÆóÍõ ¤Õ¤¿¤¢¤¤ 5.0P4.0/3.0 - 70 »ç ¤à¤é¤µ¤­ 7.5P3.5/4.0 - 71 Éòƺ ¤¨¤Ó 7.5P3.5/6.0 - 72 ¿¼Èì ¤³¤­¤Ò 8.5R4.5/4.0 - 73 µË¹¼ ¤­¤­¤ç¤¦ 10PB3.5/10 - 74 Æ£ ¤Õ¤¸ 7.5P5.0/8.0 - 75 ²´Ã° ¤Ü¤¿¤ó 5.0RP4.5/14 - 76 ËÏ ¤¹¤ß N1.5/0 - 77 ËÏÆË ¤¯¤í¤Ä¤ë¤Ð¤ß 5.0YR3.0/0.5 - 78 ⥠¤¯¤ê 2.5YR3.0/0.5 - 79 Æß ¤Ë¤Ó 7.5R4.0/0.5 - 80 ÀÄÆß ¤¢¤ª¤Ë¤Ó 5.0B4.0/0.5 - 81 Íøµ×ÁÍ ¤ê¤­¤å¤¦¤Í¤º¤ß 5.0G4.5/0.5 - 82 ³¥ ¤Ï¤¤ 5.0GY5.0/0.5 diff --git a/eword-decode.el b/eword-decode.el index fa1d5a0..fda1696 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -420,6 +420,7 @@ If SEPARATOR is not nil, it is used as header separator." (save-excursion (save-restriction (std11-narrow-to-header separator) + (rotate-memo header-eword-decode-header (buffer-substring (point-min) (point-max))) (if code-conversion (let (beg p end field-name field-body len) (goto-char (point-min)) @@ -430,7 +431,9 @@ If SEPARATOR is not nil, it is used as header separator." end (std11-field-end) field-body (buffer-substring p end)) (delete-region p end) - (insert (ew-decode-field field-name (ew-lf-crlf-to-crlf field-body))) + (insert (ew-crlf-to-lf + (ew-decode-field field-name + (ew-lf-crlf-to-crlf field-body)))) )) (eword-decode-region (point-min) (point-max) t nil nil) )))) @@ -780,13 +783,13 @@ such as a version of Net$cape)." (decoded (ew-decode-field (make-string (1- start-column) ?X) (ew-lf-crlf-to-crlf string) (if must-unfold 'ew-cut-cr-lf)))) - (if must-unfold (ew-cut-cr-lf decoded) decoded)) + (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded))) ;; Don't fold (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11)) (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string) (if must-unfold 'ew-cut-cr-lf)))) - (if must-unfold (ew-cut-cr-lf decoded) decoded)))) + (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded))))) (defun eword-decode-unstructured-field-body (string &optional must-unfold) "Decode non us-ascii characters in STRING as unstructured field body. @@ -807,9 +810,7 @@ such as a version of Net$cape)." (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string) (if must-unfold 'ew-cut-cr-lf)))) - (if must-unfold - (ew-cut-cr-lf decoded) - decoded))) + (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded)))) (defun eword-extract-address-components (string) "Extract full name and canonical address from STRING. diff --git a/mime.el b/mime.el index 338aa9c..9200173 100644 --- a/mime.el +++ b/mime.el @@ -271,8 +271,8 @@ If MESSAGE is specified, it is regarded as root entity." (setq field (eword-decode-structured-field-body field-body))) (t - (setq field (eword-decode-unstructured-field-body - field-body)) + (setq field (ew-decode-field (symbol-name field-name) + field-body)) )) (mime-entity-set-parsed-header-internal entity (put-alist field-name field header)) diff --git a/mmbuffer.el b/mmbuffer.el index 76b3fdc..9bd59e3 100644 --- a/mmbuffer.el +++ b/mmbuffer.el @@ -172,28 +172,14 @@ (set-buffer the-buf) (insert field-name) (insert ":") - (cond ((memq field eword-decode-ignored-field-list) - ;; Don't decode - (insert-buffer-substring src-buf p end) - ) - ((memq field eword-decode-structured-field-list) - ;; Decode as structured field - (let ((body (save-excursion - (set-buffer src-buf) - (buffer-substring p end) - ))) - (insert (eword-decode-and-fold-structured-field - body (1+ len))) - )) - (t - ;; Decode as unstructured field - (let ((body (save-excursion - (set-buffer src-buf) - (buffer-substring p end) - ))) - (insert (eword-decode-unstructured-field-body - body (1+ len))) - ))) + (insert (ew-crlf-to-lf + (ew-decode-field + field-name + (ew-lf-crlf-to-crlf + (save-excursion + (set-buffer src-buf) + (buffer-substring p end) + ))))) (insert "\n") ))))))))