Synch to No Gnus 200602161152.
authoryamaoka <yamaoka>
Thu, 16 Feb 2006 11:52:58 +0000 (11:52 +0000)
committeryamaoka <yamaoka>
Thu, 16 Feb 2006 11:52:58 +0000 (11:52 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index c9854ac..f5012ff 100644 (file)
@@ -1,5 +1,10 @@
 2006-02-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus-art.el (article-strip-banner): Use
+       gnus-extract-address-components instead of
+       mail-header-parse-addresses to make it work with non-ASCII text;
+       remove mail-encode-encoded-word-string.
+
        * rfc2231.el (rfc2231-parse-string): Attempt to parse parameter
        values which are surrounded with \"...\"; make it never cause a
        Lisp error; give up parsing of parameters if it failed in
index fe96f3d..c609e2c 100644 (file)
@@ -2819,20 +2819,17 @@ always hide."
          (article-really-strip-banner
           (gnus-parameter-banner gnus-newsgroup-name)))
        (when gnus-article-address-banner-alist
-         ;; 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.
+         ;; Note that the From header is decoded here, so it is
+         ;; required that the *-extract-address-components function
+         ;; supports non-ASCII text.
          (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)))))
+                            (cadr (funcall gnus-extract-address-components
+                                           from))))
              (catch 'found
                (dolist (pair gnus-article-address-banner-alist)
                  (when (string-match (car pair) from)