Synch with Gnus.
[elisp/gnus.git-] / lisp / base64.el
1 ;;; base64.el --- Base64 encoding functions using MEL
2 ;; Copyright (C) 2000 Free Software Foundation, Inc.
3
4 ;; Author: T-gnus development team
5 ;; Keywords: extensions
6
7 ;; This file is part of T-gnus.
8
9 ;; This program is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
13
14 ;; This program is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with this program; see the file COPYING.  If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
23
24 ;;; Commentary:
25
26 ;;; Code:
27
28 (eval-and-compile
29   (defun base64-autoload-functionp (object)
30     (if (functionp object)
31         (let ((def object))
32           (while (and (symbolp def) (fboundp def))
33             (setq def (symbol-function def)))
34           (eq (car-safe def) 'autoload))))
35
36   (if (base64-autoload-functionp 'base64-decode-string)
37       (fmakunbound 'base64-decode-string))
38   (if (base64-autoload-functionp 'base64-decode-region)
39       (fmakunbound 'base64-decode-region))
40   (if (base64-autoload-functionp 'base64-encode-string)
41       (fmakunbound 'base64-encode-string))
42   (if (base64-autoload-functionp 'base64-encode-region)
43       (fmakunbound 'base64-encode-region))
44
45   (require 'mel)
46
47   (mel-find-function 'mime-decode-string "base64")
48   (mel-find-function 'mime-decode-region "base64")
49   (mel-find-function 'mime-encode-string "base64")
50   (mel-find-function 'mime-encode-region "base64"))
51
52 (provide 'base64)
53
54 ;;; base64.el ends here