(TopLevel): Use `static-if', requiring "static" at the compile time.
[elisp/gnus.git-] / lisp / mm-view.el
index 19e017a..f5651f4 100644 (file)
@@ -33,6 +33,9 @@
   (autoload 'vcard-parse-string "vcard")
   (autoload 'vcard-format-string "vcard"))
 
+;; Avoid byte compile warning.
+(defvar gnus-article-mime-handles)
+
 ;;;
 ;;; Functions for displaying various formats inline
 ;;;
          (save-restriction
            (narrow-to-region b (point))
            (goto-char (point-min))
-           (if (or (re-search-forward
-                    w3-meta-content-type-charset-regexp nil t)
-                   (re-search-forward
-                    w3-meta-charset-content-type-regexp nil t))
+           (if (or (and (boundp 'w3-meta-content-type-charset-regexp)
+                        (re-search-forward
+                         w3-meta-content-type-charset-regexp nil t))
+                   (and (boundp 'w3-meta-charset-content-type-regexp)
+                        (re-search-forward
+                         w3-meta-charset-content-type-regexp nil t)))
                (setq charset (w3-coding-system-for-mime-charset 
                               (buffer-substring-no-properties 
                                (match-beginning 2) 
          (setq handles gnus-article-mime-handles))
        (when handles
          (setq gnus-article-mime-handles
-               (append gnus-article-mime-handles handles)))
+               (nconc gnus-article-mime-handles 
+                      (if (listp (car handles)) 
+                          handles (list handles)))))
        (mm-handle-set-undisplayer
         handle
         `(lambda ()