update.
[elisp/flim.git] / mailcap.el
1 ;;; mailcap.el --- mailcap parser
2
3 ;; Copyright (C) 1997,1998,1999,2000 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <tomo@m17n.org>
6 ;; Created: 1997-06-27
7 ;;      2000-11-24      Rewrote to use mime-conf.el.
8 ;; Keywords: mailcap, setting, configuration, MIME, multimedia
9 ;; Status: obsolete
10
11 ;; This file is part of FLIM (Faithful Library about Internet Message).
12
13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License as
15 ;; published by the Free Software Foundation; either version 2, or (at
16 ;; your option) any later version.
17
18 ;; This program is distributed in the hope that it will be useful, but
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 ;; General Public License for more details.
22
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 ;; Boston, MA 02110-1301, USA.
27
28 ;;; Code:
29
30 (require 'mime-conf)
31 (require 'poe) ; define-obsolete-function-alias
32
33 (define-obsolete-function-alias
34   'mailcap-parse-buffer 'mime-parse-mailcap-buffer)
35
36 (define-obsolete-function-alias
37   'mailcap-format-command 'mime-format-mailcap-command)
38   
39 (cond
40  ((featurep 'xemacs)
41   (define-obsolete-variable-alias
42     'mailcap-file 'mime-mailcap-file)
43   (define-obsolete-function-alias
44     'mailcap-parse-file 'mime-parse-mailcap-file)
45   )
46  (t
47   (defvar mailcap-file mime-mailcap-file)
48   (defun mailcap-parse-file (&optional filename order)
49     "Parse FILENAME as a mailcap, and return the result.
50 If optional argument ORDER is a function, result is sorted by it.
51 If optional argument ORDER is not specified, result is sorted original
52 order.  Otherwise result is not sorted.
53 This function is obsolete.  Please use mime-parse-mailcap-file instead."
54     (if filename
55         (mime-parse-mailcap-file filename order)
56       (let ((mime-mailcap-file mailcap-file))
57         (mime-parse-mailcap-file nil order))))
58   (make-obsolete 'mailcap-parse-file 'mime-parse-mailcap-file)
59   ))
60
61
62 ;;; @ end
63 ;;;
64
65 (provide 'mailcap)
66
67 ;;; mailcap.el ends here