diff -u /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el.0.97 /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el --- /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el.0.97 Fri Oct 29 10:51:27 1999 +++ /afs/rcf/user/dsg/elisp/gnus/lisp/mm-decode.el Fri Oct 29 10:51:27 1999 @@ -142,6 +142,9 @@ (defvar mm-attachment-override-types '("text/plain" "text/x-vcard") "Types that should have \"attachment\" ignored if they can be displayed inline.") +(defvar mm-inline-override-types nil + "Types that should be treated as attachments even if they can be displayed inline.") + (defvar mm-automatic-external-display nil "List of MIME type regexps that will be displayed externally automatically.") @@ -476,7 +479,8 @@ (type (mm-handle-media-type handle)) method result) (while (setq method (pop methods)) - (when (and (string-match method type) + (when (and (not (mm-inline-override-p handle)) + (string-match method type) (mm-inlinable-p handle)) (setq result t methods nil))) @@ -491,6 +495,16 @@ (while (setq ty (pop types)) (when (and (string-match ty type) (mm-inlinable-p handle)) + (throw 'found t)))))) + +(defun mm-inline-override-p (handle) + "Say whether HANDLE should have inline behavior overridden." + (let ((types mm-inline-override-types) + (type (mm-handle-media-type handle)) + ty) + (catch 'found + (while (setq ty (pop types)) + (when (string-match ty type) (throw 'found t)))))) (defun mm-automatic-external-display-p (type)