("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)
(insert-buffer-substring cur)
(message "Viewing with %s" method)
(let ((mm (current-buffer))
- (non-viewer (assoc "non-viewer"
- (mailcap-mime-info
- (mm-handle-media-type handle) t))))
+ (non-viewer (assq 'non-viewer
+ (mailcap-mime-info
+ (mm-handle-media-type handle) t))))
(unwind-protect
(if method
(funcall method)
(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)
(setq file (expand-file-name (file-name-nondirectory filename)
dir))
(setq file (make-temp-name (expand-file-name "mm." dir))))
- (write-region (point-min) (point-max) file nil 'nomesg)
+ (let ((coding-system-for-write mm-binary-coding-system))
+ (write-region (point-min) (point-max) file nil 'nomesg))
(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))))))
;; ange-ftp, which is reasonable to use here.
(inhibit-file-name-operation 'write-region)
(inhibit-file-name-handlers
- (if (equal (mm-handle-media-type handle)
- "application/octet-stream")
- (cons 'jka-compr-handler inhibit-file-name-handlers)
- inhibit-file-name-handlers)))
+ (cons 'jka-compr-handler inhibit-file-name-handlers)))
(write-region (point-min) (point-max) file))))
(defun mm-pipe-part (handle)