X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmailcap.el;h=d37f393136fbe57966dbfd833cde6ca486106b14;hb=82300762c3419b73fc2e994b14e3d520fe88b0a9;hp=1145c6435b2ebbfd1b250511740de3912a82b874;hpb=9e55d90f33d181194f5e1799b895fc3289152490;p=elisp%2Fgnus.git- diff --git a/lisp/mailcap.el b/lisp/mailcap.el index 1145c64..d37f393 100644 --- a/lisp/mailcap.el +++ b/lisp/mailcap.el @@ -1,5 +1,5 @@ ;;; mailcap.el --- Functions for displaying MIME parts -;; Copyright (C) 1998 Free Software Foundation, Inc. +;; Copyright (C) 1998,99 Free Software Foundation, Inc. ;; Author: William M. Perry ;; Lars Magne Ingebrigtsen @@ -51,6 +51,7 @@ (type . "application/x-x509-user-cert")) ("octet-stream" (viewer . mailcap-save-binary-file) + (non-viewer . t) (type ."application/octet-stream")) ("dvi" (viewer . "open %s") @@ -70,6 +71,7 @@ (type . "application/emacs-lisp")) ("x-tar" (viewer . mailcap-save-binary-file) + (non-viewer . t) (type . "application/x-tar")) ("x-latex" (viewer . tex-mode) @@ -93,6 +95,7 @@ (type . "application/tex")) ("zip" (viewer . mailcap-save-binary-file) + (non-viewer . t) (type . "application/zip") ("copiousoutput")) ("pdf" @@ -103,7 +106,7 @@ (type . "application/postscript") (test . (eq (mm-device-type) 'ns))) ("postscript" - (viewer . "ghostview %s") + (viewer . "ghostview -dSAFER %s") (type . "application/postscript") (test . (eq (mm-device-type) 'x)) ("needsx11")) @@ -118,6 +121,7 @@ (type . "audio/x-mpeg")) (".*" (viewer . mailcap-save-binary-file) + (non-viewer . t) (test . (or (featurep 'nas-sound) (featurep 'native-sound))) (type . "audio/*")) @@ -126,7 +130,7 @@ (type . "audio/*"))) ("message" ("rfc-*822" - (viewer . gnus-article-prepare-display) + (viewer . mm-view-message) (test . (and (featurep 'gnus) (gnus-alive-p))) (type . "message/rfc-822")) @@ -169,6 +173,16 @@ (type . "image/*") (test . (eq (mm-device-type) 'ns))) (".*" + (viewer . "display %s") + (type . "image/*") + (test . (eq (mm-device-type) 'x)) + ("needsx11")) + (".*" + (viewer . "ee %s") + (type . "image/*") + (test . (eq (mm-device-type) 'x)) + ("needsx11")) + (".*" (viewer . "xv -perfect %s") (type . "image/*") (test . (eq (mm-device-type) 'x)) @@ -210,7 +224,7 @@ (viewer . tar-mode) (type . "archive/tar") (test . (fboundp 'tar-mode))))) - "*The mailcap structure is an assoc list of assoc lists. + "The mailcap structure is an assoc list of assoc lists. 1st assoc list is keyed on the major content-type 2nd assoc list is keyed on the minor content-type (which can be a regexp) @@ -241,7 +255,10 @@ not.") (defvar mailcap-download-directory nil "*Where downloaded files should go by default.") -(defvar mailcap-temporary-directory (or (getenv "TMPDIR") "/tmp") +(defvar mailcap-temporary-directory + (cond ((fboundp 'temp-directory) (temp-directory)) + ((boundp 'temporary-file-directory) temporary-file-directory) + ("/tmp/")) "*Where temporary files go.") ;;; @@ -308,7 +325,8 @@ If FORCE, re-parse even if already parsed." (path nil) ((getenv "MAILCAPS") (setq path (getenv "MAILCAPS"))) ((memq system-type '(ms-dos ms-windows windows-nt)) - (setq path (mapconcat 'expand-file-name '("~/mail.cap" "~/etc/mail.cap") + (setq path (mapconcat 'expand-file-name + '("~/mail.cap" "~/etc/mail.cap" "~/.mailcap") ";"))) (t (setq path (mapconcat 'expand-file-name '("~/.mailcap" @@ -714,6 +732,7 @@ this type is returned." (".nc" . "application/x-netcdf") (".nc" . "application/x-netcdf") (".oda" . "application/oda") + (".patch" . "application/x-patch") (".pbm" . "image/x-portable-bitmap") (".pdf" . "application/pdf") (".pgm" . "image/portable-graymap") @@ -755,8 +774,7 @@ this type is returned." (".ai" . "application/postscript") (".jpe" . "image/jpeg") (".jpeg" . "image/jpeg")) - "*An assoc list of file extensions and the MIME content-types they -correspond to.") + "An assoc list of file extensions and corresponding MIME content-types.") (defun mailcap-parse-mimetypes (&optional path) ;; Parse out all the mimetypes specified in a unix-style path string PATH