diff options
| author | Dave Love | 2000-10-27 22:46:05 +0000 |
|---|---|---|
| committer | Dave Love | 2000-10-27 22:46:05 +0000 |
| commit | 9b198954f1d22de40393dced81ed039c6f99d4a9 (patch) | |
| tree | cea54908c41de77a46d3433f631c49edf324eedc | |
| parent | 020676925cfa3fee6a016bcbee89635dc647036f (diff) | |
| download | emacs-9b198954f1d22de40393dced81ed039c6f99d4a9.tar.gz emacs-9b198954f1d22de40393dced81ed039c6f99d4a9.zip | |
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.
| -rw-r--r-- | lisp/gnus/mailcap.el | 23 |
1 files 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 @@ | |||
| 3 | 3 | ||
| 4 | ;; Author: William M. Perry <wmperry@aventail.com> | 4 | ;; Author: William M. Perry <wmperry@aventail.com> |
| 5 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 6 | ;; Maintainer: bugs@gnus.org | ||
| 6 | ;; Keywords: news, mail | 7 | ;; Keywords: news, mail |
| 7 | 8 | ||
| 8 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -357,7 +358,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus | |||
| 357 | "/usr/local/etc/mailcap")))) | 358 | "/usr/local/etc/mailcap")))) |
| 358 | (let ((fnames (reverse | 359 | (let ((fnames (reverse |
| 359 | (if (stringp path) | 360 | (if (stringp path) |
| 360 | (parse-colon-path path) | 361 | (delete "" (split-string path path-separator)) |
| 361 | path))) | 362 | path))) |
| 362 | fname) | 363 | fname) |
| 363 | (while fnames | 364 | (while fnames |
| @@ -860,7 +861,7 @@ If FORCE, re-parse even if already parsed." | |||
| 860 | "/usr/local/etc/mime-types" | 861 | "/usr/local/etc/mime-types" |
| 861 | "/usr/local/www/conf/mime-types")))) | 862 | "/usr/local/www/conf/mime-types")))) |
| 862 | (let ((fnames (reverse (if (stringp path) | 863 | (let ((fnames (reverse (if (stringp path) |
| 863 | (parse-colon-path path) | 864 | (delete "" (split-string path path-separator)) |
| 864 | path))) | 865 | path))) |
| 865 | fname) | 866 | fname) |
| 866 | (while fnames | 867 | (while fnames |
| @@ -937,7 +938,23 @@ The path of COMMAND will be returned iff COMMAND is a command." | |||
| 937 | (defun mailcap-mime-types () | 938 | (defun mailcap-mime-types () |
| 938 | "Return a list of MIME media types." | 939 | "Return a list of MIME media types." |
| 939 | (mailcap-parse-mimetypes) | 940 | (mailcap-parse-mimetypes) |
| 940 | (mm-delete-duplicates (mapcar 'cdr mailcap-mime-extensions))) | 941 | (mm-delete-duplicates |
| 942 | (nconc | ||
| 943 | (mapcar 'cdr mailcap-mime-extensions) | ||
| 944 | (apply | ||
| 945 | 'nconc | ||
| 946 | (mapcar | ||
| 947 | (lambda (l) | ||
| 948 | (delq nil | ||
| 949 | (mapcar | ||
| 950 | (lambda (m) | ||
| 951 | (let ((type (cdr (assq 'type (cdr m))))) | ||
| 952 | (if (equal (cadr (split-string type "/")) | ||
| 953 | "*") | ||
| 954 | nil | ||
| 955 | type))) | ||
| 956 | (cdr l)))) | ||
| 957 | mailcap-mime-data))))) | ||
| 941 | 958 | ||
| 942 | (provide 'mailcap) | 959 | (provide 'mailcap) |
| 943 | 960 | ||