From: akr Date: Fri, 25 Sep 1998 05:07:46 +0000 (+0000) Subject: * ew-compat.el: New file. X-Git-Tag: doodle-1_10_0~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=701a870e54e2951582d9690569c8f5fea3a1a9da;p=elisp%2Fflim.git * ew-compat.el: New file. * FLIM-ELS (flim-modules): Add `ew-compat'. --- diff --git a/ChangeLog b/ChangeLog index b86ee37..881b533 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-09-25 Tanaka Akira + + * ew-compat.el: New file. + + * FLIM-ELS (flim-modules): Add `ew-compat'. + 1998-09-21 Tanaka Akira * mel.el: Use `broken-p' to check facility. diff --git a/DOODLE-TIPS b/DOODLE-TIPS index f817d19..19608f5 100644 --- a/DOODLE-TIPS +++ b/DOODLE-TIPS @@ -5,35 +5,18 @@ Especialy ew-line.el, ew-scan-m.el, ew-scan-s.el and ew-scan-u.el that are require 'lex. (lex is scanner generator.) -* 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. +* Multiline field-bodies fetched from XOVER is already unfolded, +so special care is needed for gnus-structured-field-decoder and +gnus-unstructured-field-decoder. -(setq gnus-structured-field-decoder - (lambda (string) - (if (fboundp 'ew-decode-field) - (let ((ew-ignore-76bytes-limit t)) - (ew-cut-cr-lf - (ew-decode-field "From" (ew-lf-crlf-to-crlf string)))) - (eword-decode-and-unfold-structured-field string)))) +(autoload 'ew-gnus-structured-field-decoder "ew-compat") +(setq gnus-structured-field-decoder 'ew-gnus-structured-field-decoder) -(setq gnus-unstructured-field-decoder - (lambda (string) - (if (fboundp 'ew-decode-field) - (let ((ew-ignore-76bytes-limit t)) - (ew-cut-cr-lf - (ew-decode-field "Subject" (ew-lf-crlf-to-crlf string)))) - (eword-decode-unstructured-field-body - (std11-unfold-string string) 'must-unfold)))) +(autoload 'ew-gnus-unstructured-field-decoder "ew-compat") +(setq gnus-unstructured-field-decoder 'ew-gnus-unstructured-field-decoder) * Ignore warnings about args-eword-* when byte-compiling. -* If you have a problem with ew-ccl-b or other CCL based coding-system, -set ew-bq-use-mel to t. - * If you want to modify load-path or other variables when byte-compiling without editing files, set EVALARGS environment variable. diff --git a/FLIM-ELS b/FLIM-ELS index 3b4949c..8b7e8e2 100644 --- a/FLIM-ELS +++ b/FLIM-ELS @@ -26,6 +26,7 @@ ew-scan-n ew-dec eword-decode eword-encode + ew-compat mime mime-parse mmbuffer mmcooked mailcap )) diff --git a/ew-compat.el b/ew-compat.el new file mode 100644 index 0000000..be59e96 --- /dev/null +++ b/ew-compat.el @@ -0,0 +1,25 @@ +(require 'ew-dec) +(require 'eword-decode) + +(defun ew-gnus-structured-field-decoder (string) + (if (fboundp 'ew-decode-field) + (let ((ew-ignore-76bytes-limit t) + (ew-default-mime-charset default-mime-charset)) + (condition-case nil + (ew-cut-cr-lf (ew-decode-field "From" (ew-lf-crlf-to-crlf string))) + (error + (message "gnus-structured-field-decoder error: %s" string) + (decode-mime-charset-string string 'x-ctext)))) + (eword-decode-and-unfold-structured-field string))) + +(defun ew-gnus-unstructured-field-decoder (string) + (if (fboundp 'ew-decode-field) + (let ((ew-ignore-76bytes-limit t) + (ew-default-mime-charset default-mime-charset)) + (condition-case nil + (ew-cut-cr-lf (ew-decode-field "Subject" (ew-lf-crlf-to-crlf string))) + (error + (message "gnus-unstructured-field-decoder error: %s" string) + (decode-mime-charset-string string 'x-ctext)))) + (eword-decode-unstructured-field-body (std11-unfold-string string) 'must-unfold))) +