*** empty log message ***
[gnus] / lisp / mm-decode.el
index 72ce0c2..e52b99b 100644 (file)
     ("text/x-vcard"
      mm-inline-text
      (lambda (handle)
-       (locate-library "vcard")))
+       (or (featurep 'vcard)
+          (locate-library "vcard"))))
     ("message/delivery-status" mm-inline-text identity)
     ("message/rfc822" mm-inline-message identity)
     ("text/.*" mm-inline-text identity)
@@ -348,6 +349,7 @@ external if displayed external."
                         (mm-handle-media-type handle) t))
             (needsterm (or (assoc "needsterm" mime-info)
                            (assoc "needsterminal" mime-info)))
+            (copiousoutput (assoc "copiousoutput" mime-info))
             process file buffer)
        ;; We create a private sub-directory where we store our files.
        (make-directory dir)
@@ -361,18 +363,30 @@ external if displayed external."
        (message "Viewing with %s" method)
        (unwind-protect
            (setq process
-                 (if needsterm
-                     (start-process "*display*" nil
-                                    "xterm"
-                                    "-e" shell-file-name "-c"
-                                    (mm-mailcap-command
-                                     method file (mm-handle-type handle)))
-                   (start-process "*display*"
-                                  (setq buffer (generate-new-buffer "*mm*"))
-                                  shell-file-name
-                                  "-c"
-                                  (mm-mailcap-command
-                                   method file (mm-handle-type handle)))))
+                 (cond (needsterm
+                        (start-process "*display*" nil
+                                       "xterm"
+                                       "-e" shell-file-name 
+                                       shell-command-switch
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle))))
+                       (copiousoutput
+                        (start-process "*display*"
+                                       (setq buffer 
+                                             (generate-new-buffer "*mm*"))
+                                       shell-file-name
+                                       shell-command-switch
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle)))
+                        (switch-to-buffer buffer))
+                       (t
+                        (start-process "*display*"
+                                       (setq buffer
+                                             (generate-new-buffer "*mm*"))
+                                       shell-file-name
+                                       shell-command-switch
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle))))))
          (mm-handle-set-undisplayer handle (cons file buffer)))
        (message "Displaying %s..." (format method file))))))