2 ;;; mel.el : a MIME encoding/decoding library
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
11 ;;; $Id: mel.el,v 3.3 1996/01/09 18:31:08 morioka Exp $
12 ;;; Keywords: MIME, Quoted-Printable
14 ;;; This file is part of MEL (MIME Encoding Library).
16 ;;; This program is free software; you can redistribute it and/or
17 ;;; modify it under the terms of the GNU General Public License as
18 ;;; published by the Free Software Foundation; either version 2, or
19 ;;; (at your option) any later version.
21 ;;; This program is distributed in the hope that it will be useful,
22 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 ;;; General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with This program. If not, write to the Free Software
28 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32 (autoload 'base64-encode-region "mel-b" nil t)
33 (autoload 'base64-decode-region "mel-b" nil t)
34 (autoload 'base64-encode-string "mel-b")
35 (autoload 'base64-decode-string "mel-b")
36 (autoload 'base64-encoded-length "mel-b")
38 (autoload 'quoted-printable-encode-region "mel-q" nil t)
39 (autoload 'quoted-printable-decode-region "mel-q" nil t)
41 (autoload 'q-encoding-encode-string-for-text "mel-q")
42 (autoload 'q-encoding-encode-string-for-comment "mel-q")
43 (autoload 'q-encoding-encode-string-for-phrase "mel-q")
44 (autoload 'q-encoding-encode-string "mel-q")
45 (autoload 'q-encoding-decode-string "mel-q")
46 (autoload 'q-encoding-encoded-length "mel-q")
48 (autoload 'uuencode-encode-region "mel-u" nil t)
49 (autoload 'uuencode-decode-region "mel-u" nil t)
51 (defvar mime-encoding-method-alist
52 '(("base64" . base64-encode-region)
53 ("quoted-printable" . quoted-printable-encode-region)
54 ("x-uue" . uuencode-encode-region)
60 (defvar mime-decoding-method-alist
61 '(("base64" . base64-decode-region)
62 ("quoted-printable" . quoted-printable-decode-region)
63 ("x-uue" . uuencode-decode-region)
70 (defun mime/encode-region (encoding beg end)
71 "Encode region BEG to END of current buffer using ENCODING. [mel.el]"
73 (list (completing-read "encoding: "
74 mime-encoding-method-alist
76 (region-beginning) (region-end))
78 (let ((f (cdr (assoc encoding mime-encoding-method-alist))))
83 (defun mime/decode-region (encoding beg end)
84 "Decode region BEG to END of current buffer using ENCODING. [mel.el]"
86 (list (completing-read "encoding: "
87 mime-decoding-method-alist
89 (region-beginning) (region-end))
91 (let ((f (cdr (assoc encoding mime-decoding-method-alist))))
96 (defalias 'mime-encode-region 'mime/encode-region)
97 (defalias 'mime-decode-region 'mime/decode-region)