From: yamaoka Date: Thu, 6 May 2004 14:54:55 +0000 (+0000) Subject: Synch to No Gnus 200405061334. X-Git-Tag: t-gnus-6_17_4-quimby-~945 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4bb4bf9107614171235586d515d6b297e2a916c9;p=elisp%2Fgnus.git- Synch to No Gnus 200405061334. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8d51e4..e758535 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,7 @@ 2004-05-06 TSUCHIYA Masatoshi - * gnus-art.el (article-strip-banner): Use original from fields - instead of MIME-decoded from fields, when checking + * gnus-art.el (article-strip-banner): Use MIME-encoded from fields + instead of MIME-decoded from fields when checking `gnus-article-address-banner-alist'. 2004-05-03 Jesper Harder diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b3f65a2..b92c81f 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2624,9 +2624,20 @@ always hide." (article-really-strip-banner (gnus-parameter-banner gnus-newsgroup-name))) (when gnus-article-address-banner-alist - (let ((from (caar (mail-header-parse-addresses - (gnus-fetch-original-field "from"))))) - (when from + ;; It is necessary to encode from fields before checking, + ;; because `mail-header-parse-addresses' does not work + ;; (reliably) on decoded headers. And more, it is + ;; impossible to use `gnus-fetch-original-field' here, + ;; because `article-strip-banner' may be called in draft + ;; buffers to preview them. + (let ((from (save-restriction + (widen) + (article-narrow-to-head) + (mail-fetch-field "from")))) + (when (and from + (setq from + (caar (mail-header-parse-addresses + (mail-encode-encoded-word-string from))))) (catch 'found (dolist (pair gnus-article-address-banner-alist) (when (string-match (car pair) from)