(gnus-button): New face.
[gnus] / lisp / gnus-art.el
index 5435cdc..65d63d5 100644 (file)
@@ -53,6 +53,7 @@
 (autoload 'gnus-button-reply "gnus-msg" nil t)
 (autoload 'parse-time-string "parse-time" nil nil)
 (autoload 'ansi-color-apply-on-region "ansi-color")
+(autoload 'mm-url-insert-file-contents-external "mm-url")
 
 (defgroup gnus-article nil
   "Article display."
@@ -650,7 +651,12 @@ Each element is a regular expression."
 (make-obsolete-variable 'gnus-article-hide-pgp-hook
                        "This variable is obsolete in Gnus 5.10.")
 
-(defcustom gnus-article-button-face 'bold
+(defface gnus-button
+  '((t :weight bold))
+  "Face used for highlighting a button in the article buffer."
+  :group 'gnus-article-buttons)
+
+(defcustom gnus-article-button-face 'gnus-button
   "Face used for highlighting buttons in the article buffer.
 
 An article button is a piece of text that you can activate by pressing
@@ -2613,14 +2619,16 @@ Recurse into multiparts."
                    (string-match "text/html" (car (mm-handle-type handle))))
               (let ((tmp-file (mm-make-temp-file
                                ;; Do we need to care for 8.3 filenames?
-                               (format "mm-") nil ".html")))
+                               "mm-" nil ".html")))
                 (mm-save-part-to-file handle tmp-file)
                 (browse-url tmp-file)
                 (setq showed t)))
              ;; If multipart, recurse
              ((and (stringp (car handle))
                    (string-match "^multipart/" (car handle))
-                   (setq showed (or showed (hs-show-html-list handle))))))))
+                   (setq showed
+                         (or showed
+                             (gnus-article-browse-html-parts handle))))))))
     showed))
 
 ;; TODO: Key binding; Remove temp files.
@@ -2702,20 +2710,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)