Importing Gnus v5.8.5.
[elisp/gnus.git-] / lisp / mailcap.el
index 8a15334..cda6987 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mailcap.el --- Functions for displaying MIME parts
-;; Copyright (C) 1998,99 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author: William M. Perry <wmperry@aventail.com>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -672,6 +672,7 @@ this type is returned."
            (setq viewers (cdr viewers)))
          (setq passed (sort (nreverse passed) 'mailcap-viewer-lessp))
          (setq viewer (car passed))))
+      (setq passed (nreverse passed))
       (when (and (stringp (cdr (assq 'viewer viewer)))
                 passed)
        (setq viewer (car passed)))
@@ -713,7 +714,9 @@ this type is returned."
     (".cdf"      . "application/x-netcdr")
     (".cpio"     . "application/x-cpio")
     (".csh"      . "application/x-csh")
+    (".css"      . "text/css")
     (".dvi"      . "application/x-dvi")
+    (".diff"     . "text/x-patch")
     (".el"       . "application/emacs-lisp")
     (".eps"      . "application/postscript")
     (".etx"      . "text/x-setext")
@@ -800,11 +803,21 @@ this type is returned."
    ((memq system-type '(ms-dos ms-windows windows-nt))
     (setq path (mapconcat 'expand-file-name
                          '("~/mime.typ" "~/etc/mime.typ") ";")))
-   (t (setq path (mapconcat 'expand-file-name
-                           '("~/.mime-types"
-                             "/etc/mime-types:/usr/etc/mime-types"
-                             "/usr/local/etc/mime-types"
-                             "/usr/local/www/conf/mime-types") ":"))))
+   (t (setq path (mapconcat
+                 'expand-file-name
+                 ;; mime.types seems to be the normal name,
+                 ;; definitely so on current GNUish systems.  The
+                 ;; ordering follows that for mailcap.
+                 '("~/.mime.types"
+                   "/etc/mime.types"
+                   "/usr/etc/mime.types"
+                   "/usr/local/etc/mime.types"
+                   "/usr/local/www/conf/mime.types"
+                   "~/.mime-types"
+                   "/etc/mime-types"
+                   "/usr/etc/mime-types"
+                   "/usr/local/etc/mime-types"
+                   "/usr/local/www/conf/mime-types") ":"))))
   (let ((fnames (reverse
                 (split-string path
                               (if (memq system-type