+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.
(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
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