* gnus-util.el (gnus-bind-print-variables): New macro.
[gnus] / lisp / mm-decode.el
index e259120..4019132 100644 (file)
@@ -98,8 +98,9 @@
 
 (defcustom mm-text-html-renderer
   (cond ((locate-library "w3") 'w3)
-       ((locate-library "w3m") 'w3m)
-       ((executable-find "w3m") 'w3m-standalone)
+       ((executable-find "w3m") (if (locate-library "w3m")
+                                    'w3m
+                                  'w3m-standalone))
        ((executable-find "links") 'links)
        ((executable-find "lynx") 'lynx)
        (t 'html2text))
@@ -521,15 +522,11 @@ Postpone undisplaying of viewers for types in
          ;; solution, avoids most of them.
          (if from
              (setq from (cadr (mail-extract-address-components from))))))
-      (when cte
-       (setq cte (mail-header-strip cte)))
       (if (or (not ctl)
              (not (string-match "/" (car ctl))))
          (mm-dissect-singlepart
           (list mm-dissect-default-type)
-          (and cte (intern (downcase (mail-header-remove-whitespace
-                                      (mail-header-remove-comments
-                                       cte)))))
+          (and cte (intern (downcase (mail-header-strip cte))))
           no-strict-mime
           (and cd (ignore-errors (mail-header-parse-content-disposition cd)))
           description)
@@ -562,9 +559,7 @@ Postpone undisplaying of viewers for types in
           (mm-possibly-verify-or-decrypt
            (mm-dissect-singlepart
             ctl
-            (and cte (intern (downcase (mail-header-remove-whitespace
-                                        (mail-header-remove-comments
-                                         cte)))))
+            (and cte (intern (downcase (mail-header-strip cte))))
             no-strict-mime
             (and cd (ignore-errors
                       (mail-header-parse-content-disposition cd)))
@@ -579,7 +574,11 @@ Postpone undisplaying of viewers for types in
 (defun mm-dissect-singlepart (ctl cte &optional force cdl description id)
   (when (or force
            (if (equal "text/plain" (car ctl))
-               (assoc 'format ctl)
+               ;; FIXME: This is a kludge.  Proper fix is to make
+               ;; gnus-display-mime invoke mm-uu-dissect on all
+               ;; textual MIME parts, and stop using mm-fill-flowed
+               ;; here.
+               (and mm-fill-flowed (assoc 'format ctl))
              t))
     (mm-make-handle
      (mm-copy-to-buffer) ctl cte nil cdl description nil id)))
@@ -1089,9 +1088,10 @@ string if you do not like underscores."
       (setq filename (gnus-map-function mm-file-name-rewrite-functions
                                        (file-name-nondirectory filename))))
     (setq file
-         (read-file-name "Save MIME part to: "
-                         (or mm-default-directory default-directory)
-                         nil nil (or filename name "")))
+         (mm-with-multibyte
+           (read-file-name "Save MIME part to: "
+                           (or mm-default-directory default-directory)
+                           nil nil (or filename name ""))))
     (setq mm-default-directory (file-name-directory file))
     (and (or (not (file-exists-p file))
             (yes-or-no-p (format "File %s already exists; overwrite? "
@@ -1479,4 +1479,5 @@ If RECURSIVE, search recursively."
 
 (provide 'mm-decode)
 
+;;; arch-tag: 4f35d360-56b8-4030-9388-3ed82d359b9b
 ;;; mm-decode.el ends here