changeset 32989:74484f2d629a

2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu> * mailcap.el (mailcap-parse-mailcaps): Don't use parse-colon-path, because they are files, not paths. (mailcap-parse-mimetypes): Ditto. (mailcap-mime-types): Use mailcap-mime-data.
author Dave Love <fx@gnu.org>
date Fri, 27 Oct 2000 22:46:05 +0000
parents c3435dc00ed7
children a2bbecad7065
files lisp/gnus/mailcap.el
diffstat 1 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mailcap.el	Fri Oct 27 22:20:19 2000 +0000
+++ b/lisp/gnus/mailcap.el	Fri Oct 27 22:46:05 2000 +0000
@@ -3,6 +3,7 @@
 
 ;; Author: William M. Perry <wmperry@aventail.com>
 ;;	Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Maintainer: bugs@gnus.org
 ;; Keywords: news, mail
 
 ;; This file is part of GNU Emacs.
@@ -357,7 +358,7 @@
 		"/usr/local/etc/mailcap"))))
     (let ((fnames (reverse
 		   (if (stringp path)
-		       (parse-colon-path path)
+		       (delete "" (split-string path path-separator))
 		     path)))
 	  fname)
       (while fnames
@@ -860,7 +861,7 @@
 		"/usr/local/etc/mime-types"
 		"/usr/local/www/conf/mime-types"))))
     (let ((fnames (reverse (if (stringp path)
-			       (parse-colon-path path)
+			       (delete "" (split-string path path-separator))
 			     path)))
 	  fname)
       (while fnames
@@ -937,7 +938,23 @@
 (defun mailcap-mime-types ()
   "Return a list of MIME media types."
   (mailcap-parse-mimetypes)
-  (mm-delete-duplicates (mapcar 'cdr mailcap-mime-extensions)))
+  (mm-delete-duplicates
+   (nconc
+    (mapcar 'cdr mailcap-mime-extensions)
+    (apply
+     'nconc
+     (mapcar
+      (lambda (l)
+	(delq nil
+	      (mapcar
+	       (lambda (m)
+		 (let ((type (cdr (assq 'type (cdr m)))))
+		   (if (equal (cadr (split-string type "/"))
+			      "*")
+		       nil
+		     type)))
+	       (cdr l))))
+      mailcap-mime-data)))))
 
 (provide 'mailcap)