From 9b198954f1d22de40393dced81ed039c6f99d4a9 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 27 Oct 2000 22:46:05 +0000 Subject: [PATCH] 2000-10-27 ShengHuo ZHU * 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. --- lisp/gnus/mailcap.el | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index e913573566f..081cf60d735 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -3,6 +3,7 @@ ;; Author: William M. Perry ;; Lars Magne Ingebrigtsen +;; Maintainer: bugs@gnus.org ;; Keywords: news, mail ;; This file is part of GNU Emacs. @@ -357,7 +358,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus "/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 @@ If FORCE, re-parse even if already parsed." "/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 @@ The path of COMMAND will be returned iff COMMAND is a command." (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) -- 2.39.2