synch with flim-1_14
authorokada <okada>
Tue, 16 Jan 2001 18:50:58 +0000 (18:50 +0000)
committerokada <okada>
Tue, 16 Jan 2001 18:50:58 +0000 (18:50 +0000)
15 files changed:
ChangeLog
FLIM-API.en
FLIM-ELS
Makefile
VERSION
ftp.in
mel.el
mime-conf.el
mime-def.el
mmbuffer.el
mmexternal.el
qmtp.el
raw-io.el [deleted file]
smtp.el
smtpmail.el

index 2fa1e84..96ed3ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,68 @@
+2000-12-27  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+       * mime-conf.el (mime-mailcap-file): Turn to non user option.
+
+\f
 2000-12-22  Kenichi OKADA <okada@opaopa.org>
 
        * SLIM: Version 1.14.5 released.
        * mime-def.el (mime-library-product): Up.
 
+2000-12-23  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+       * smtpmail.el (smtpmail-send-it): Use
+       `binary-write-decoded-region' instead of `binary-write-region'.
+
+       * mmexternal.el (mmexternal-require-buffer): Use
+       `binary-insert-encoded-file' instead of
+       `binary-insert-file-contents'.
+       (mime-write-entity-body): Use `binary-write-decoded-region'
+       instead of `binary-write-region'.
+
+       * mmbuffer.el (mime-write-entity-body): Use
+       `binary-write-decoded-region' instead of `binary-write-region'.
+
+       * mel.el: - Don't require `raw-io'.
+       (8bit-insert-encoded-file): New function.
+       (8bit-write-decoded-region): New function.
+       (7bit-insert-encoded-file): New alias.
+       (7bit-write-decoded-region): New alias.
+       (binary-insert-encoded-file): New alias.
+       (binary-find-file-noselect): New function.
+       (binary-funcall): New function.
+       (binary-to-text-funcall): New function.
+       (mime-insert-encoded-file of "base64"): Use
+       `binary-insert-encoded-file' instead of
+       `binary-insert-file-contents'.
+
+       * FLIM-API.en (base64-decode-string): New function.
+       (base64-encode-string): New function.
+       (ENCODING-write-decoded-region): New function.
+       (ENCODING-insert-encoded-file): New function.
+
+       * raw-io.el: Deleted.
+
+       * FLIM-ELS (flim-modules): Delete `raw-io'.
+
+2000-12-22  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+       * smtp.el (smtp-open-connection-function): Revert initial value to
+       `open-network-stream'.
+       (qmtp-open-connection): Use `binary-funcall'.
+
+       * qmtp.el (qmtp-open-connection-function): Revert initial value to
+       `open-network-stream'.
+       (qmtp-send-buffer): Use `binary-funcall'.
+       
+2000-12-23  OKAZAKI Tetsurou  <okazaki@be.to>
+
+       * FLIM-ELS (flim-modules): Delete `mmdbuffer'.
+
+\f
+2000-12-22  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+       * FLIM: Version 1.14.1 (Yagi) released.
+
 2000-12-22  Keiichi Suzuki  <keiichi@mdcnet.co.jp>
 
        * mel-q.el: Require `poem' for `string-to-char-list' when
 \f
 1998-07-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.8.0 (\e-DÒkubo)\e-A was released.
+       * FLIM: Version 1.8.0 (\e-D\83\81kubo)\e-A was released.
 
        * README.en: Delete `How to use'.
 
index 623ca7b..ed2a2fd 100644 (file)
@@ -1,6 +1,6 @@
          FLIM (Faithful Library about Internet Message) API
                             Version 1.14
-                          Draft Release 1
+                          Draft Release 2
 
 * Notation
 
@@ -626,7 +626,7 @@ and return parsed it.
   [Suggest]
 
 
-** Decoder
+** String
 
 [Function] mime-decode-string (string encoding)
   Decode STRING using ENCODING.
@@ -637,15 +637,32 @@ and return parsed it.
   [Required]<Suggest>
 
 
-[Function] mime-decode-region (start end encoding)
-  Decode region START to END of current buffer using ENCODING.
+[Function] mime-encode-string (string encoding)
+  Encode STRING using ENCODING.
 
   ENCODING must be string.
 
-  [Suggest]<Not Suggest>
+  [Required]<Suggest>
+
+
+[Function] base64-decode-string (STRING)
+  Base64-decode STRING and return the result.
+
+  [Required]
+
+
+[Function] base64-encode-string (STRING &optional NO-LINE-BREAK)
+  Base64-encode STRING and return the result.
 
+  Optional second argument NO-LINE-BREAK means do not break long lines
+  into shorter lines.
 
-[Function] mime-write-decoded-region (start end filename encoding)
+  [Required]
+
+
+** File
+
+[Command] mime-write-decoded-region (start end filename encoding)
   Decode and write current region encoded by ENCODING into FILENAME.
 
   START and END are buffer positions.
@@ -653,17 +670,94 @@ and return parsed it.
   [Required]<Suggest>
 
 
-** Encoder
+[Command] mime-insert-encoded-file (filename encoding)
+  Insert file FILENAME encoded by ENCODING format.
 
-[Function] mime-encode-string (string encoding)
-  Encode STRING using ENCODING.
+  [Required]<Suggest>
+
+
+[Command] 7bit-write-decoded-region (start end filename)
+  Decode and write current region encoded by "7bit" into FILENAME.
+
+  START and END are buffer positions.
+
+  [Optional]
+
+
+[Command] 7bit-insert-encoded-file (filename)
+  Insert file FILENAME encoded by "7bit" format.
+
+  [Optional]
+
+
+[Command] 8bit-write-decoded-region (start end filename)
+  Decode and write current region encoded by "8bit" into FILENAME.
+
+  START and END are buffer positions.
+
+  [Optional]
+
+
+[Command] 8bit-insert-encoded-file (filename)
+  Insert file FILENAME encoded by "8bit" format.
+
+  [Optional]
+
+
+[Command] binary-write-decoded-region (start end filename)
+  Decode and write current region encoded by "binary" into FILENAME.
+
+  START and END are buffer positions.
+
+  [Required]
+
+
+[Command] binary-insert-encoded-file (filename)
+  Insert file FILENAME encoded by "binary" format.
+
+  [Required]
+
+
+[Command] base64-write-decoded-region (start end filename)
+  Decode and write current region encoded by "base64" into FILENAME.
+
+  START and END are buffer positions.
+
+  [Optional]
+
+
+[Command] base64-insert-encoded-file (filename)
+  Insert file FILENAME encoded by "base64" format.
+
+  [Optional]
+
+
+[Command] quoted-printable-write-decoded-region (start end filename)
+  Decode and write current region encoded by "quoted-printable" into
+  FILENAME.
+
+  START and END are buffer positions.
+
+  [Optional]
+
+
+[Command] quoted-printable-insert-encoded-file (filename)
+  Insert file FILENAME encoded by "quoted-printable" format.
+
+  [Optional]
+
+
+** Region
+
+[Command] mime-decode-region (start end encoding)
+  Decode region START to END of current buffer using ENCODING.
 
   ENCODING must be string.
 
-  [Optional]<Not Suggest>
+  [Suggest]<Not Suggest>
 
 
-[Function] mime-encode-region (start end encoding)
+[Command] mime-encode-region (start end encoding)
   Encode region START to END of current buffer using ENCODING.
 
   ENCODING must be string.
@@ -671,10 +765,26 @@ and return parsed it.
   [Suggest]<Not Suggest>
 
 
-[Function] mime-insert-encoded-file (filename encoding)
-  Insert file FILENAME encoded by ENCODING format.
+[Command] base64-decode-region (BEG END)
+  Base64-decode the region between BEG and END.
 
-  [Required]<Suggest>
+  Return the length of the decoded text.
+  
+  If the region can't be decoded, return nil and don't modify the
+  buffer.
+
+  [Suggest]<Not Suggest>
+
+
+[Command] base64-encode-region (BEG END &optional NO-LINE-BREAK)
+  Base64-encode the region between BEG and END.
+
+  Return the length of the encoded text.
+
+  Optional third argument NO-LINE-BREAK means do not break long lines
+  into shorter lines.
+
+  [Suggest]<Not Suggest>
 
 
 ** encoded-text
index cb181e1..5849c3f 100644 (file)
--- a/FLIM-ELS
+++ b/FLIM-ELS
@@ -9,12 +9,11 @@
                     mel mel-q mel-u mel-g
                     eword-decode eword-encode
                     mime mime-parse mmgeneric
-                    mmbuffer mmcooked mmdbuffer mmexternal
+                    mmbuffer mmcooked mmexternal
                     mime-conf
              unique-id scram-md5
                     sasl sasl-cram sasl-digest
-                    smtp qmtp smtpmail
-                    raw-io))
+                    smtp qmtp smtpmail))
 
 (setq flim-version-specific-modules '(mailcap))
 
index b9ae69b..7a9fbce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 
 PACKAGE = slim
 API    = 1.14
-RELEASE = 5
+RELEASE = 6
 
 TAR    = tar
 RM     = /bin/rm -f
diff --git a/VERSION b/VERSION
index cffe646..4c95594 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -50,9 +50,9 @@
 1.13.2 Kasanui                 \e$(B3^K%\e(B
 1.14.0 Ninokuchi               \e$(B?7%N8}\e(B
 1.14.1 Yagi                    \e$(BH,LZ\e(B             ; = \e$(B6aE4\e(B \e$(BBg:e@~\e(B
------- Yagi-Nishiguchi         \e$(BH,LZ@>8}\e(B
+1.14.2 Yagi-Nishiguchi         \e$(BH,LZ@>8}\e(B
 ------ Unebigory\e-Dòmae\e-A             \e$(B@&K58fNMA0\e(B
------- Kashiharajingu-mae      \e$(B3`86?@5\A0\e(B       ; = \e$(B6aE4\e(B \e$(BFnBg:e@~!"5HLn@~\e(B
+------ Kashiharajing\e-Dþ-mae\e-A        \e$(B3`86?@5\A0\e(B       ; = \e$(B6aE4\e(B \e$(BFnBg:e@~!"5HLn@~\e(B
 
 
 [Chao Version names]
diff --git a/ftp.in b/ftp.in
index 391fb8a..698a6c9 100644 (file)
--- a/ftp.in
+++ b/ftp.in
@@ -10,8 +10,6 @@
        URL*2="comp/emacsen/lisp/";
        URL*3="flim/flim-API/";
        URL*4="PACKAGE-VERSION.tar.gz"]]
-Content-Type: application/octet-stream;
-       name="PACKAGE-VERSION.tar.gz";
-       type=tar;
-       conversions=gzip
+Content-Type: application/octet-stream
+Content-Disposition: attachment; filename="PACKAGE-VERSION.tar.gz"
 --}-<<alternative>>
diff --git a/mel.el b/mel.el
index 8c84ac5..6d7de59 100644 (file)
--- a/mel.el
+++ b/mel.el
@@ -1,6 +1,6 @@
 ;;; mel.el --- A MIME encoding/decoding library.
 
-;; Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
+;; Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <tomo@m17n.org>
 ;; Created: 1995/6/25
@@ -26,7 +26,6 @@
 ;;; Code:
 
 (require 'mime-def)
-(require 'raw-io)
 (require 'alist)
 
 (defcustom mime-encoding-list
@@ -78,22 +77,78 @@ Content-Transfer-Encoding for it."
 ;;; @ setting for modules
 ;;;
 
-(mel-define-backend "7bit")
-(mel-define-method-function (mime-encode-string string (nil "7bit"))
+(defun 8bit-insert-encoded-file (filename)
+  "Insert file FILENAME encoded by \"7bit\" format."
+  (let ((coding-system-for-read 'raw-text)
+       format-alist)
+    ;; Returns list of absolute file name and length of data inserted.
+    (insert-file-contents filename)))
+
+(defun 8bit-write-decoded-region (start end filename)
+  "Decode and write current region encoded by \"8bit\" into FILENAME."
+  (let ((coding-system-for-write 'raw-text)
+       format-alist)
+    (write-region start end filename)))
+
+(mel-define-backend "8bit")
+(mel-define-method-function (mime-encode-string string (nil "8bit"))
                            'identity)
-(mel-define-method-function (mime-decode-string string (nil "7bit"))
+(mel-define-method-function (mime-decode-string string (nil "8bit"))
                            'identity)
-(mel-define-method mime-encode-region (start end (nil "7bit")))
-(mel-define-method mime-decode-region (start end (nil "7bit")))
-(mel-define-method-function (mime-insert-encoded-file filename (nil "7bit"))
-                           'binary-insert-file-contents)
+(mel-define-method mime-encode-region (start end (nil "8bit")))
+(mel-define-method mime-decode-region (start end (nil "8bit")))
+(mel-define-method-function (mime-insert-encoded-file filename (nil "8bit"))
+                           '8bit-insert-encoded-file)
 (mel-define-method-function (mime-write-decoded-region
-                            start end filename (nil "7bit"))
-                           'binary-write-region)
+                            start end filename (nil "8bit"))
+                           '8bit-write-decoded-region)
 
-(mel-define-backend "8bit" ("7bit"))
 
-(mel-define-backend "binary" ("8bit"))
+(defalias '7bit-insert-encoded-file '8bit-insert-encoded-file)
+(defalias '7bit-write-decoded-region '8bit-write-decoded-region)
+
+(mel-define-backend "7bit" ("8bit"))
+
+
+(defun binary-write-decoded-region (start end filename)
+  "Decode and write current region encoded by \"binary\" into FILENAME."
+  (let ((coding-system-for-write 'binary)
+       jka-compr-compression-info-list jam-zcat-filename-list)
+    (write-region start end filename)))
+
+(defalias 'binary-insert-encoded-file 'insert-file-contents-literally)
+
+(defun binary-find-file-noselect (filename &optional nowarn rawfile)
+  "Like `find-file-noselect', q.v., but don't code and format conversion."
+  (let ((coding-system-for-read 'binary)
+       format-alist)
+    (find-file-noselect filename nowarn rawfile)))
+
+(defun binary-funcall (name &rest args)
+  "Like `funcall', q.v., but read and write as binary."
+  (let ((coding-system-for-read 'binary)
+       (coding-system-for-write 'binary))
+    (apply name args)))
+
+(defun binary-to-text-funcall (coding-system name &rest args)
+  "Like `funcall', q.v., but write as binary and read as text.
+Read text is decoded as CODING-SYSTEM."
+  (let ((coding-system-for-read coding-system)
+       (coding-system-for-write 'binary))
+    (apply name args)))
+
+(mel-define-backend "binary")
+(mel-define-method-function (mime-encode-string string (nil "binary"))
+                           'identity)
+(mel-define-method-function (mime-decode-string string (nil "binary"))
+                           'identity)
+(mel-define-method mime-encode-region (start end (nil "binary")))
+(mel-define-method mime-decode-region (start end (nil "binary")))
+(mel-define-method-function (mime-insert-encoded-file filename (nil "binary"))
+                           'binary-insert-encoded-file)
+(mel-define-method-function (mime-write-decoded-region
+                            start end filename (nil "binary"))
+                           'binary-write-decoded-region)
 
 (defvar mel-b-builtin
    (and (fboundp 'base64-encode-string)
@@ -118,7 +173,7 @@ mmencode included in metamail or XEmacs package)."
     (insert (base64-encode-string
             (with-temp-buffer
               (set-buffer-multibyte nil)
-              (binary-insert-file-contents filename)
+              (binary-insert-encoded-file filename)
               (buffer-string))))
     (or (bolp) (insert ?\n)))
     
index 84fed40..0550893 100644 (file)
@@ -176,10 +176,8 @@ order.  Otherwise result is not sorted."
 
 
 ;;;###autoload
-(defcustom mime-mailcap-file "~/.mailcap"
-  "*File name of user's mailcap file."
-  :group 'mime
-  :type 'file)
+(defvar mime-mailcap-file "~/.mailcap"
+  "*File name of user's mailcap file.")
 
 ;;;###autoload
 (defun mime-parse-mailcap-file (&optional filename order)
index 58c7558..b5efbe3 100644 (file)
@@ -1,4 +1,4 @@
-;;; mime-def.el --- definition module about MIME -*- coding: iso-2022-jp; -*-
+;;; mime-def.el --- definition module about MIME -*- coding: iso-8859-4; -*-
 
 ;; Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc.
 
index b99d80b..1447d17 100644 (file)
                                            filename)
   (save-excursion
     (set-buffer (mime-buffer-entity-buffer-internal entity))
-    (binary-write-region (mime-buffer-entity-body-start-internal entity)
-                        (mime-buffer-entity-body-end-internal entity)
-                        filename)))
+    (binary-write-decoded-region
+     (mime-buffer-entity-body-start-internal entity)
+     (mime-buffer-entity-body-end-internal entity)
+     filename)))
 
 
 ;;; @ entity content
index dde1406..aafddcc 100644 (file)
@@ -78,7 +78,7 @@
                                 (concat " *Body of "
                                         (mime-entity-name entity)
                                         "*"))
-            (binary-insert-file-contents
+            (binary-insert-encoded-file
              (mime-external-entity-body-file-internal entity))
             (current-buffer))))
       (error (message "Can't get external-body.")))))
                                            filename)
   (mmexternal-require-buffer entity)
   (with-current-buffer (mime-external-entity-body-buffer-internal entity)
-    (binary-write-region (point-min) (point-max) filename)))
+    (binary-write-decoded-region (point-min) (point-max) filename)))
 
 
 ;;; @ entity content
diff --git a/qmtp.el b/qmtp.el
index 1010857..e74f798 100644 (file)
--- a/qmtp.el
+++ b/qmtp.el
@@ -34,6 +34,7 @@
 ;;; Code:
 
 (require 'custom)
+(require 'mel) ; binary-funcall
 
 (defgroup qmtp nil
   "QMTP protocol for sending mail."
@@ -60,9 +61,8 @@ called from `qmtp-via-qmtp' with arguments SENDER and RECIPIENTS.")
   :type 'integer
   :group 'qmtp)
 
-(autoload 'binary-open-network-stream "raw-io")
 ;;;###autoload
-(defvar qmtp-open-connection-function (function binary-open-network-stream))
+(defvar qmtp-open-connection-function (function open-network-stream))
 
 (defvar qmtp-error-response-alist
   '((?Z "Temporary failure")
@@ -128,8 +128,9 @@ called from `qmtp-via-qmtp' with arguments SENDER and RECIPIENTS.")
       (unwind-protect
          (progn
            (setq process
-                 (funcall qmtp-open-connection-function
-                          "QMTP" (current-buffer) qmtp-server qmtp-service))
+                 (binary-funcall qmtp-open-connection-function
+                                 "QMTP" (current-buffer)
+                                 qmtp-server qmtp-service))
            (qmtp-send-package process sender recipients buffer))
        (when (and process
                   (memq (process-status process) '(open run)))
diff --git a/raw-io.el b/raw-io.el
deleted file mode 100644 (file)
index 5652c94..0000000
--- a/raw-io.el
+++ /dev/null
@@ -1,116 +0,0 @@
-;;; raw-io.el --- input/output without code-conversion
-
-;; Copyright (C) 1997,1998,1999,2000 Free Software Foundation, Inc.
-
-;; Author: MORIOKA Tomohiko <tomo@m17n.org>
-;; Keywords: definition, MIME, multimedia, mail, news
-
-;; This file is part of APEL (A Portable Emacs Library).
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Code:
-
-(eval-when-compile (require 'static))
-
-(static-if (and (featurep 'xemacs)
-               (not (featurep 'utf-2000)))
-    (defun binary-insert-file-contents (filename
-                                       &optional visit beg end replace)
-      "Like `insert-file-contents', but only reads in the file literally.
-A buffer may be modified in several ways after reading into the buffer,
-to Emacs features such as format decoding, character code
-conversion, find-file-hooks, automatic uncompression, etc.
-
-This function ensures that none of these modifications will take place."
-      (let ((format-alist nil)
-           (after-insert-file-functions nil)
-           (coding-system-for-read 'binary)
-           (coding-system-for-write 'binary)
-           (jka-compr-compression-info-list nil)
-           (jam-zcat-filename-list nil)
-           (find-buffer-file-type-function
-            (if (fboundp 'find-buffer-file-type)
-                (symbol-function 'find-buffer-file-type)
-              nil)))
-       (unwind-protect
-           (progn
-             (fset 'find-buffer-file-type (lambda (filename) t))
-             (insert-file-contents filename visit beg end replace))
-         (if find-buffer-file-type-function
-             (fset 'find-buffer-file-type find-buffer-file-type-function)
-           (fmakunbound 'find-buffer-file-type)))))
-  (defalias 'binary-insert-file-contents 'insert-file-contents-literally))
-
-(defun binary-write-region (start end filename
-                                 &optional append visit lockname)
-  "Like `write-region', q.v., but don't encode."
-  (let ((coding-system-for-write 'binary)
-       jka-compr-compression-info-list jam-zcat-filename-list)
-    (write-region start end filename append visit lockname)))
-
-(defun binary-find-file-noselect (filename &optional nowarn rawfile)
-  "Like `find-file-noselect', q.v., but don't code and format conversion."
-  (let ((coding-system-for-read 'binary)
-       format-alist)
-    (find-file-noselect filename nowarn rawfile)))
-
-(defun binary-open-network-stream (name buffer host service &rest options)
-  "Like `open-network-stream', q.v., but don't code and format conversion."
-  (let ((coding-system-for-read  'binary)
-       (coding-system-for-write 'binary))
-    (apply #'open-network-stream name buffer host service options)))
-
-(defun binary-start-process (name buffer program &rest program-args)
-  "Like `start-process', q.v., but don't code conversion."
-  (let ((coding-system-for-read 'binary)
-       (coding-system-for-write 'binary))
-    (apply #'start-process name buffer program program-args)))
-
-(defun binary-start-process-shell-command (name buffer &rest args)
-  "Like `start-process-shell-command', q.v., but don't code conversion."
-  (let ((coding-system-for-read 'binary)
-       (coding-system-for-write 'binary))
-    (apply #'start-process-shell-command name buffer args)))
-
-
-(defun raw-text-insert-file-contents (filename
-                                     &optional visit beg end replace)
-  "Like `insert-file-contents', q.v., but don't code and format conversion.
-Like `insert-file-contents-literary', but it allows find-file-hooks,
-automatic uncompression, etc.
-Like `binary-insert-file-contents', but it converts line-break
-code."
-  (let ((coding-system-for-read 'raw-text)
-       format-alist)
-    ;; Returns list of absolute file name and length of data inserted.
-    (insert-file-contents filename visit beg end replace)))
-
-
-(defun raw-message-write-region (start end filename
-                                      &optional append visit lockname)
-  "Like `write-region', q.v., but write as network representation."
-  (let ((coding-system-for-write 'raw-text-dos)
-       format-alist)
-    (write-region start end filename append visit lockname)))
-
-
-;;; @ end
-;;;
-
-(provide 'raw-io)
-
-;;; raw-io.el ends here
diff --git a/smtp.el b/smtp.el
index 220a177..75ac48e 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -1,6 +1,6 @@
 ;;; smtp.el --- basic functions to send mail with SMTP server
 
-;; Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
 ;;     Simon Leinen <simon@switch.ch> (ESMTP support)
@@ -35,6 +35,7 @@
 (require 'mail-utils)                  ; mail-strip-quoted-names
 (require 'sasl)
 (require 'luna)
+(require 'mel) ; binary-funcall
 
 (defgroup smtp nil
   "SMTP protocol for sending mail."
@@ -112,9 +113,8 @@ don't define this value."
 
 (defvar sasl-mechanisms)
 
-(autoload 'binary-open-network-stream "raw-io")
 ;;;###autoload
-(defvar smtp-open-connection-function #'binary-open-network-stream)
+(defvar smtp-open-connection-function #'open-network-stream)
 
 (defvar smtp-read-point nil)
 
@@ -236,8 +236,8 @@ Return a newly allocated connection-object.
 BUFFER is the buffer to associate with the connection.  SERVER is name
 of the host to connect to.  SERVICE is name of the service desired."
   (let ((process
-        (funcall smtp-open-connection-function
-                 "SMTP" buffer  server service))
+        (binary-funcall smtp-open-connection-function
+                        "SMTP" buffer server service))
        connection)
     (when process
       (setq connection (smtp-make-connection process server service))
index 6475e44..dae1378 100644 (file)
@@ -1,6 +1,6 @@
 ;;; smtpmail.el --- SMTP interface for mail-mode
 
-;; Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
 ;; Keywords: mail
@@ -46,7 +46,7 @@
 (require 'smtp)
 (require 'sendmail)
 (require 'time-stamp)
-(require 'raw-io)
+(require 'mel) ; binary-write-decoded-region, binary-find-file-noselect
 
 (eval-when-compile (require 'static))
 
@@ -245,7 +245,7 @@ This is relative to `smtpmail-queue-dir'.")
                (insert-buffer tembuf)
                (or (file-directory-p smtpmail-queue-dir)
                    (make-directory smtpmail-queue-dir t))
-               (binary-write-region (point-min) (point-max) file-data)
+               (binary-write-decoded-region (point-min) (point-max) file-data)
                (set-buffer buffer-elisp)
                (erase-buffer)
                (insert (concat