release.
[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., 59 Temple Place - Suite 330,
26 ;; Boston, MA 02111-1307, USA.
27
28 ;;; Code:
29
30 (require 'mime-conf)
31
32 (define-obsolete-function-alias
33   'mailcap-parse-buffer 'mime-parse-mailcap-buffer)
34
35 (define-obsolete-function-alias
36   'mailcap-format-command 'mime-format-mailcap-command)
37   
38 (cond
39  ((featurep 'xemacs)
40   (define-obsolete-variable-alias
41     'mailcap-file 'mime-mailcap-file)
42   (define-obsolete-function-alias
43     'mailcap-parse-file 'mime-parse-mailcap-file)
44   )
45  (t
46   (defvar mailcap-file mime-mailcap-file)
47   (defun mailcap-parse-file (&optional filename order)
48     "Parse FILENAME as a mailcap, and return the result.
49 If optional argument ORDER is a function, result is sorted by it.
50 If optional argument ORDER is not specified, result is sorted original
51 order.  Otherwise result is not sorted.
52 This function is obsolete.  Please use mime-parse-mailcap-file instead."
53     (if filename
54         (mime-parse-mailcap-file filename order)
55       (let ((mime-mailcap-file mailcap-file))
56         (mime-parse-mailcap-file nil order))))
57   (make-obsolete 'mailcap-parse-file 'mime-parse-mailcap-file)
58   ))
59
60
61 ;;; @ end
62 ;;;
63
64 (provide 'mailcap)
65
66 ;;; mailcap.el ends here