* wl-draft.el (wl-draft-reply): Use `mime-find-field-decoder' to
authorteranisi <teranisi>
Fri, 19 Jan 2001 08:54:28 +0000 (08:54 +0000)
committerteranisi <teranisi>
Fri, 19 Jan 2001 08:54:28 +0000 (08:54 +0000)
 find decoder for To, Cc, and Subject.

wl/ChangeLog
wl/wl-draft.el

index 25b53cf..48fe912 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-19  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-draft.el (wl-draft-reply): Use `mime-find-field-decoder' to
+       find decoder for To, Cc, and Subject.
+
 2001-01-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * Version number is increased to 2.4.1.
index c591c9a..02edd66 100644 (file)
@@ -270,18 +270,9 @@ Return symbol, not list.  Use symbol-name"
 (defun wl-draft-reply (buf no-arg summary-buf)
   ""
 ;;;(save-excursion
-  (let (r-list r-list-name
-       (mime-header-lexical-analyzer '(eword-analyze-quoted-string
-                                       eword-analyze-domain-literal
-                                       eword-analyze-comment
-                                       eword-analyze-spaces
-                                       eword-analyze-special
-                                       eword-analyze-encoded-word
-                                       eword-analyze-atom))
-       eword-lexical-analyzer
+  (let (r-list
        to mail-followup-to cc subject in-reply-to references newsgroups
-       from to-alist cc-alist)
-    (setq eword-lexical-analyzer mime-header-lexical-analyzer)
+       from to-alist cc-alist r-list-name decoder)
     (set-buffer buf)
     (setq from (wl-address-header-extract-address (std11-field-body "From")))
     ;; symbol-name use in error message
@@ -328,32 +319,21 @@ Return symbol, not list.  Use symbol-name"
          cc (wl-parse-addresses cc))
     (with-temp-buffer                  ; to keep raw buffer unibyte.
       (elmo-set-buffer-multibyte default-enable-multibyte-characters)
-      (setq subject (or (and subject
-                            (eword-decode-string
-                             (decode-mime-charset-string
-                              subject
-                              wl-mime-charset)))))
+      (setq decoder (mime-find-field-decoder 'Subject 'plain))
+      (setq subject (if decoder (funcall decoder subject) subject))
       (setq to-alist 
            (mapcar
-            '(lambda (addr)
-               (setq addr (eword-extract-address-components addr))
-               (cons (nth 1 addr)
-                     (if (nth 0 addr)
-                         (concat
-                          (wl-address-quote-specials (nth 0 addr))
-                          " <" (nth 1 addr) ">")
-                       (nth 1 addr))))
+            (lambda (addr)
+              (setq decoder (mime-find-field-decoder 'To 'plain))
+              (cons (nth 1 (std11-extract-address-components addr))
+                    (if decoder (funcall decoder addr) addr)))
             to))
       (setq cc-alist 
            (mapcar
-            '(lambda (addr)
-               (setq addr (eword-extract-address-components addr))
-               (cons (nth 1 addr)
-                     (if (nth 0 addr)
-                         (concat
-                          (wl-address-quote-specials (nth 0 addr))
-                          " <" (nth 1 addr) ">")
-                       (nth 1 addr))))
+            (lambda (addr)
+              (setq decoder (mime-find-field-decoder 'Cc 'plain))
+              (cons (nth 1 (std11-extract-address-components addr))
+                    (if decoder (funcall decoder addr) addr)))
             cc)))
     (and subject wl-reply-subject-prefix
         (setq subject (concat wl-reply-subject-prefix