Gnus development mailing list
 help / color / mirror / Atom feed
* mailcap-mime-types
@ 2000-08-16 13:45 Toby Speight
  2000-08-16 13:58 ` mailcap-mime-types Toby Speight
  0 siblings, 1 reply; 2+ messages in thread
From: Toby Speight @ 2000-08-16 13:45 UTC (permalink / raw)


The current version of `mailcap-mime-types' returns only those types
that have appropriate filename extensions in mime.types.  Here's one
which also reads mailcap-mime-data to get all types that have handlers
(it still gets those from mime.types - but I don't think it should).

This is useful for `gnus-mime-view-part-as-type', which uses the
result for its (completing-read).  I notice that the mml-attach-*
functions use `mml-minibuffer-read-type' - perhaps that could be
shared instead of applying my change?

(defun mailcap-mime-types ()
  "Return a list of MIME media types."
  (delete nil
          (mm-delete-duplicates
           (apply 'append
                  (mapcar 'cdr mailcap-mime-extensions)
                  (mapcar '(lambda (x)
                             (and (not (string-match "\\.?\\*" (car x)))
                                  (mapcar '(lambda (x)
                                             (and (not (string-match "\\.?\\*" (car x)))
                                                  (cdr (assoc 'type x))))
                                          (cdr x))))
                          mailcap-mime-data)))))



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-16 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-16 13:45 mailcap-mime-types Toby Speight
2000-08-16 13:58 ` mailcap-mime-types Toby Speight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).