From: morioka Date: Sun, 11 Jan 1998 17:27:19 +0000 (+0000) Subject: MEL 7.2 (not released yet). X-Git-Tag: mel-7_2-current X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c9b6f08862eca91677126dedc230dc8c2cf9e2;p=elisp%2Fflim.git MEL 7.2 (not released yet). --- diff --git a/mel.el b/mel.el index ac397a2..93ee0d6 100644 --- a/mel.el +++ b/mel.el @@ -1,11 +1,11 @@ ;;; mel.el : a MIME encoding/decoding library -;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; modified by Shuhei KOBAYASHI ;; Created: 1995/6/25 -;; Version: $Id: mel.el,v 7.1 1997/11/06 16:17:11 morioka Exp $ +;; Version: $Id: mel.el,v 7.2 1998/01/11 16:16:44 morioka Exp $ ;; Keywords: MIME, Base64, Quoted-Printable, uuencode, gzip64 ;; This file is part of MEL (MIME Encoding Library). @@ -35,19 +35,79 @@ "/tmp/") "*Directory for temporary files.") +(defvar base64-dl-module + (and (fboundp 'dynamic-link) + (expand-file-name "base64.so" exec-directory))) -;;; @ region + +;;; @ autoload ;;; -(autoload 'base64-encode-region - "mel-b" "Encode current region by base64." t) -(autoload 'quoted-printable-encode-region - "mel-q" "Encode current region by Quoted-Printable." t) -(autoload 'uuencode-encode-region - "mel-u" "Encode current region by unofficial uuencode format." t) -(autoload 'gzip64-encode-region - "mel-g" "Encode current region by unofficial x-gzip64 format." t) +(cond (base64-dl-module + (autoload 'base64-encode-string "mel-dl" + "Encode STRING to base64, and return the result.") + (autoload 'base64-decode-string "mel-dl" + "Decode STRING which is encoded in base64, and return the result.") + (autoload 'base64-encode-region "mel-dl" + "Encode current region by base64." t) + (autoload 'base64-decode-region "mel-dl" + "Decode current region by base64." t) + (autoload 'base64-insert-encoded-file "mel-dl" + "Encode contents of file to base64, and insert the result." t) + ;; for encoded-word + (autoload 'base64-encoded-length "mel-dl") + ) + (t + (autoload 'base64-encode-string "mel-b" + "Encode STRING to base64, and return the result.") + (autoload 'base64-decode-string "mel-b" + "Decode STRING which is encoded in base64, and return the result.") + (autoload 'base64-encode-region "mel-b" + "Encode current region by base64." t) + (autoload 'base64-decode-region "mel-b" + "Decode current region by base64." t) + (autoload 'base64-insert-encoded-file "mel-b" + "Encode contents of file to base64, and insert the result." t) + ;; for encoded-word + (autoload 'base64-encoded-length "mel-b") + )) + +(autoload 'quoted-printable-encode-string "mel-q" + "Encode STRING to quoted-printable, and return the result.") +(autoload 'quoted-printable-decode-string "mel-q" + "Decode STRING which is encoded in quoted-printable, and return the result.") +(autoload 'quoted-printable-encode-region "mel-q" + "Encode current region by Quoted-Printable." t) +(autoload 'quoted-printable-decode-region "mel-q" + "Decode current region by Quoted-Printable." t) +(autoload 'quoted-printable-insert-encoded-file "mel-q" + "Encode contents of file to quoted-printable, and insert the result." t) +;; for encoded-word +(autoload 'q-encoding-encode-string "mel-q" + "Encode STRING to Q-encoding of encoded-word, and return the result.") +(autoload 'q-encoding-decode-string "mel-q" + "Decode STRING which is encoded in Q-encoding and return the result.") +(autoload 'q-encoding-encoded-length "mel-q") + +(autoload 'uuencode-encode-region "mel-u" + "Encode current region by unofficial uuencode format." t) +(autoload 'uuencode-decode-region "mel-u" + "Decode current region by unofficial uuencode format." t) +(autoload 'uuencode-insert-encoded-file "mel-u" + "Insert file encoded by unofficial uuencode format." t) + +(autoload 'gzip64-encode-region "mel-g" + "Encode current region by unofficial x-gzip64 format." t) +(autoload 'gzip64-decode-region "mel-g" + "Decode current region by unofficial x-gzip64 format." t) +(autoload 'gzip64-insert-encoded-file "mel-g" + "Insert file encoded by unofficial gzip64 format." t) + +;;; @ region +;;; + +;;;###autoload (defvar mime-encoding-method-alist '(("base64" . base64-encode-region) ("quoted-printable" . quoted-printable-encode-region) @@ -63,16 +123,7 @@ Each element looks like (STRING . FUNCTION) or (STRING . nil). STRING is content-transfer-encoding. FUNCTION is region encoder and nil means not to encode.") - -(autoload 'base64-decode-region - "mel-b" "Decode current region by base64." t) -(autoload 'quoted-printable-decode-region - "mel-q" "Decode current region by Quoted-Printable." t) -(autoload 'uuencode-decode-region - "mel-u" "Decode current region by unofficial uuencode format." t) -(autoload 'gzip64-decode-region - "mel-g" "Decode current region by unofficial x-gzip64 format." t) - +;;;###autoload (defvar mime-decoding-method-alist '(("base64" . base64-decode-region) ("quoted-printable" . quoted-printable-decode-region) @@ -85,7 +136,6 @@ Each element looks like (STRING . FUNCTION). STRING is content-transfer-encoding. FUNCTION is region decoder.") - ;;;###autoload (defun mime-encode-region (start end encoding) "Encode region START to END of current buffer using ENCODING. @@ -124,15 +174,7 @@ region by its value." ;;; @ file ;;; -(autoload 'base64-insert-encoded-file "mel-b" - "Encode contents of file to base64, and insert the result." t) -(autoload 'quoted-printable-insert-encoded-file "mel-q" - "Encode contents of file to quoted-printable, and insert the result." t) -(autoload 'uuencode-insert-encoded-file - "mel-u" "Insert file encoded by unofficial uuencode format." t) -(autoload 'gzip64-insert-encoded-file - "mel-g" "Insert file encoded by unofficial gzip64 format." t) - +;;;###autoload (defvar mime-file-encoding-method-alist '(("base64" . base64-insert-encoded-file) ("quoted-printable" . quoted-printable-insert-encoded-file) @@ -163,27 +205,6 @@ FUNCTION is function to insert encoded file.") ))) -;;; @ string -;;; - -(autoload 'base64-encode-string "mel-b" - "Encode STRING to base64, and return the result.") -(autoload 'base64-decode-string "mel-b" - "Decode STRING which is encoded in base64, and return the result.") -(autoload 'quoted-printable-encode-string "mel-q" - "Encode STRING to quoted-printable, and return the result.") -(autoload 'quoted-printable-decode-string "mel-q" - "Decode STRING which is encoded in quoted-printable, and return the result.") - -(autoload 'q-encoding-encode-string "mel-q" - "Encode STRING to Q-encoding of encoded-word, and return the result.") -(autoload 'q-encoding-decode-string "mel-q" - "Decode STRING which is encoded in Q-encoding and return the result.") - -(autoload 'base64-encoded-length "mel-b") -(autoload 'q-encoding-encoded-length "mel-q") - - ;;; @ end ;;;