- (and (or (featurep 'nas-sound) (featurep 'native-sound))
- (device-sound-enabled-p)))
- ("audio/au" mm-inline-audio
- (and (or (featurep 'nas-sound) (featurep 'native-sound))
- (device-sound-enabled-p))))
- "Alist of media types/test that say whether the media types can be displayed inline.")
-
-(defvar mm-user-display-methods
- '(("image/.*" . inline)
- ("text/.*" . inline)
- ("message/delivery-status" . inline)))
-
-(defvar mm-user-automatic-display
- '("text/plain" "text/enriched" "text/richtext" "text/html"
- "image/.*" "message/delivery-status" "multipart/.*"))
-
-(defvar mm-alternative-precedence
- '("image/jpeg" "image/gif" "text/html" "text/enriched"
- "text/richtext" "text/plain")
- "List that describes the precedence of alternative parts.")
-
-(defvar mm-tmp-directory "/tmp/"
+ (lambda (handle)
+ (and (or (featurep 'nas-sound) (featurep 'native-sound))
+ (device-sound-enabled-p))))
+ ("audio/au"
+ mm-inline-audio
+ (lambda (handle)
+ (and (or (featurep 'nas-sound) (featurep 'native-sound))
+ (device-sound-enabled-p))))
+ ("application/pgp-signature" ignore identity)
+ ("multipart/alternative" ignore identity)
+ ("multipart/mixed" ignore identity)
+ ("multipart/related" ignore identity))
+ "Alist of media types/tests saying whether types can be displayed inline."
+ :type '(repeat (list (string :tag "MIME type")
+ (function :tag "Display function")
+ (function :tag "Display test")))
+ :group 'mime-display)
+
+(defcustom mm-inlined-types
+ '("image/.*" "text/.*" "message/delivery-status" "message/rfc822"
+ "application/pgp-signature")
+ "List of media types that are to be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-automatic-display
+ '("text/plain" "text/enriched" "text/richtext" "text/html"
+ "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
+ "message/rfc822" "text/x-patch" "application/pgp-signature")
+ "A list of MIME types to be displayed automatically."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-attachment-override-types '("text/x-vcard")
+ "Types to have \"attachment\" ignored if they can be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-inline-override-types nil
+ "Types to be treated as attachments even if they can be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-automatic-external-display nil
+ "List of MIME type regexps that will be displayed externally automatically."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-discouraged-alternatives nil
+ "List of MIME types that are discouraged when viewing multipart/alternative.
+Viewing agents are supposed to view the last possible part of a message,
+as that is supposed to be the richest. However, users may prefer other
+types instead, and this list says what types are most unwanted. If,
+for instance, text/html parts are very unwanted, and text/richtech are
+somewhat unwanted, then the value of this variable should be set
+to:
+
+ (\"text/html\" \"text/richtext\")"
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defvar mm-tmp-directory
+ (cond ((fboundp 'temp-directory) (temp-directory))
+ ((boundp 'temporary-file-directory) temporary-file-directory)
+ ("/tmp/"))