- (while path
- (when (and (file-executable-p
- (setq file (expand-file-name command (pop path))))
- (not (file-directory-p file)))
- (throw 'found file))))))
+ (while (setq dir (pop path))
+ (let ((suffixes mailcap-binary-suffixes))
+ (while suffixes
+ (when (and (file-executable-p
+ (setq file (expand-file-name
+ (concat command (pop suffixes))
+ dir)))
+ (not (file-directory-p file)))
+ (throw 'found file))))))))
+
+(defun mailcap-mime-types ()
+ "Return a list of MIME media types."
+ (delete-duplicates (mapcar 'cdr mailcap-mime-extensions)))