* mm-decode.el (mm-dissect-singlepart): Check that the decoder exists.
[gnus] / lisp / mm-decode.el
index ec8dd5b..e6407cf 100644 (file)
@@ -29,6 +29,7 @@
 
 (require 'mail-parse)
 (require 'mm-bodies)
+(require 'mm-archive)
 (eval-when-compile (require 'cl)
                   (require 'term))
 
@@ -653,8 +654,14 @@ Postpone undisplaying of viewers for types in
            (if (equal "text/plain" (car ctl))
                (assoc 'format ctl)
              t))
-    (mm-make-handle
-     (mm-copy-to-buffer) ctl cte nil cdl description nil id)))
+    (let ((handle
+          (mm-make-handle
+           (mm-copy-to-buffer) ctl cte nil cdl description nil id))
+         (decoder (assoc (car ctl) mm-archive-decoders)))
+      (if (and decoder
+              (executable-find (cadr decoder)))
+         (mm-dissect-archive handle)
+       handle))))
 
 (defun mm-dissect-multipart (ctl from)
   (goto-char (point-min))
@@ -942,7 +949,7 @@ external if displayed external."
                          ;; In particular, the timer object (which is
                          ;; a vector in Emacs but is a list in XEmacs)
                          ;; requires that it is lexically scoped.
-                         (timer (run-at-time 2.0 nil 'ignore)))
+                         (timer (run-at-time 30.0 nil 'ignore)))
                       (if (featurep 'xemacs)
                           (lambda (process state)
                             (when (eq 'exit (process-status process))
@@ -1353,7 +1360,7 @@ Use CMD as the process."
                  (mailcap-mime-info type 'all)))
         (method (let ((minibuffer-local-completion-map
                        mm-viewer-completion-map))
-                  (gnus-completing-read "Viewer" methods))))
+                  (completing-read "Viewer: " methods))))
     (when (string= method "")
       (error "No method given"))
     (if (string-match "^[^% \t]+$" method)