From: yamaoka Date: Tue, 26 Dec 2000 01:34:46 +0000 (+0000) Subject: Synch with `flim-1_14'. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3ae1abe0e59b02eaedf9aba5ba582e99ed99920d;p=elisp%2Fflim.git Synch with `flim-1_14'. * mel.el (binary-to-text-funcall): Bind `default-process-coding-system', `input-coding-system', `output-coding-system', `program-coding-system-alist', and `selective-display' for old Emacsen. It won't work with Nemacs. (binary-funcall): Bind `default-kanji-flag', `default-kanji-process-code', `default-mc-flag', `default-process-coding-system', `input-coding-system', `kanji-flag', `mc-flag', `output-coding-system', `program-coding-system-alist', `program-kanji-code-alist' and `selective-display' for old Emacsen. (binary-find-file-noselect): Alias to `find-file-noselect-as-binary'. (binary-insert-encoded-file): Alias to `insert-file-contents-as-binary'. (binary-write-decoded-region): Alias to `write-region-as-binary'. (8bit-write-decoded-region): Use `write-region-as-coding-system' with the 1st arg `raw-text'. (8bit-insert-encoded-file): Alias to `insert-file-contents-as-raw-text'. --- diff --git a/ChangeLog b/ChangeLog index cf868d8..af8ce5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,85 @@ +2000-12-26 Katsumi Yamaoka + + * mel.el (binary-to-text-funcall): Bind + `default-process-coding-system', `input-coding-system', + `output-coding-system', `program-coding-system-alist', and + `selective-display' for old Emacsen. It won't work with Nemacs. + (binary-funcall): Bind `default-kanji-flag', + `default-kanji-process-code', `default-mc-flag', + `default-process-coding-system', `input-coding-system', + `kanji-flag', `mc-flag', `output-coding-system', + `program-coding-system-alist', `program-kanji-code-alist' + and `selective-display' for old Emacsen. + (binary-find-file-noselect): Alias to + `find-file-noselect-as-binary'. + (binary-insert-encoded-file): Alias to + `insert-file-contents-as-binary'. + (binary-write-decoded-region): Alias to `write-region-as-binary'. + (8bit-write-decoded-region): Use `write-region-as-coding-system' + with the 1st arg `raw-text'. + (8bit-insert-encoded-file): Alias to + `insert-file-contents-as-raw-text'. + + +2000-12-25 MORIOKA Tomohiko + + * FLIM: Version 1.14.2 (Yagi-Nishiguchi) released. + +2000-12-23 MORIOKA Tomohiko + + * 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 + + * 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 + + * FLIM-ELS (flim-modules): Delete `mmdbuffer'. + + +2000-12-22 MORIOKA Tomohiko + + * FLIM: Version 1.14.1 (Yagi) released. + 2000-12-22 Katsumi Yamaoka * raw-io.el (binary-start-process-shell-command): Replace #' with @@ -49,6 +131,8 @@ 2000-12-20 MORIOKA Tomohiko + * FLIM: Version 1.14.0 (Ninokuchi) released. + * mime.el (mime-entity-media-type): Add DOC. (mime-entity-media-subtype): Add DOC. (mime-entity-parameters): Add DOC. @@ -519,7 +603,7 @@ 2000-07-12 MORIOKA Tomohiko - * FLIM-Chao: Version 1.14.1 (Rokujiz~) released. + * FLIM-Chao: Version 1.14.1 (Rokujiz-Dò)-A released. 2000-07-10 MORIOKA Tomohiko @@ -718,7 +802,7 @@ 1999-12-14 MORIOKA Tomohiko - * CLIME: Version 1.13.6 (Nakanosh~) released. + * CLIME: Version 1.13.6 (Nakanosh-Dò)-A released. 1999-12-13 Katsumi Yamaoka @@ -865,7 +949,7 @@ 1999-08-19 MORIOKA Tomohiko - * CLIME: Version 1.13.0 (Shin-H~ry~ji) released. + * CLIME: Version 1.13.0 (Shin-H-Dòryþji)-A released. 1999-08-18 MORIOKA Tomohiko @@ -1297,7 +1381,7 @@ 1999-05-31 MORIOKA Tomohiko - * FLIM: Version 1.12.7 (Y~zaki) released. + * FLIM: Version 1.12.7 (Y-Dþzaki)-A released. 1999-05-31 MORIOKA Tomohiko @@ -1472,7 +1556,7 @@ 1999-05-11 MORIOKA Tomohiko - * FLIM: Version 1.12.6 (Family-K~enmae) released. + * FLIM: Version 1.12.6 (Family-K-Dòenmae)-A released. 1999-04-27 Shuhei KOBAYASHI @@ -1589,7 +1673,7 @@ 1999-01-23 MORIOKA Tomohiko - * FLIM: Version 1.12.3 (Kintetsu-K~riyama) released. + * FLIM: Version 1.12.3 (Kintetsu-K-Dòriyama)-A released. 1999-01-23 MORIOKA Tomohiko @@ -1632,7 +1716,7 @@ 1999-01-21 MORIOKA Tomohiko - * FLIM: Version 1.12.2 (Kuj~) released. + * FLIM: Version 1.12.2 (Kuj-Dò)-A released. 1999-01-16 MORIOKA Tomohiko @@ -1818,7 +1902,7 @@ 1998-12-02 MORIOKA Tomohiko - * FLIM: Version 1.12.1 (Nishinoky~) released. + * FLIM: Version 1.12.1 (Nishinoky-Dò)-A released. 1998-11-30 MORIOKA Tomohiko @@ -2036,7 +2120,7 @@ 1998-10-26 MORIOKA Tomohiko - * FLIM: Version 1.11.2 (Heij~) was released. + * FLIM: Version 1.11.2 (Heij-Dò)-A was released. * NEWS (Abolish variable `mime-temp-directory'): New subsection. @@ -2316,7 +2400,7 @@ 1998-10-12 MORIOKA Tomohiko - * FLIM: Version 1.10.4 (Shin-H~sono) was released. + * FLIM: Version 1.10.4 (Shin-H-Dòsono)-A was released. 1998-10-12 Katsumi Yamaoka @@ -2501,7 +2585,7 @@ 1998-09-29 MORIOKA Tomohiko - * FLIM: Version 1.10.0 (K~do) was released. + * FLIM: Version 1.10.0 (K-Dòdo)-A was released. * README.en (What's FLIM): Add mel-ccl.el. @@ -2788,7 +2872,7 @@ 1998-08-31 MORIOKA Tomohiko - * FLIM: Version 1.9.1 (Tonosh~) was released. + * FLIM: Version 1.9.1 (Tonosh-Dò)-A was released. * mime-en.sgml (mm-backend): Translate a little. @@ -2931,7 +3015,7 @@ 1998-07-07 MORIOKA Tomohiko - * FLIM-Chao: Version 1.8.0 (Shij~) was released. + * FLIM-Chao: Version 1.8.0 (Shij-Dò)-A was released. 1998-07-07 MORIOKA Tomohiko @@ -3043,7 +3127,7 @@ 1998-07-01 MORIOKA Tomohiko - * FLIM: Version 1.8.0 (~kubo) was released. + * FLIM: Version 1.8.0 (-DÒkubo)-A was released. * README.en: Delete `How to use'. @@ -3168,7 +3252,7 @@ 1998-06-28 MORIOKA Tomohiko - * FLIM-Chao: Version 1.7.0 (Goj~) was released. + * FLIM-Chao: Version 1.7.0 (Goj-Dò)-A was released. 1998-06-26 MORIOKA Tomohiko @@ -3427,7 +3511,7 @@ 1998-06-19 MORIOKA Tomohiko - * FLIM: Version 1.4.1 (Momoyama-Gory~mae) was released. + * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae)-A was released. 1998-06-18 MORIOKA Tomohiko @@ -3547,7 +3631,7 @@ 1998-05-06 MORIOKA Tomohiko - * FLIM: Version 1.2.0 (J~j~) was released. + * FLIM: Version 1.2.0 (J-Dþjò)-A was released. * README.en (What's FLIM): Delete description about std11-parse.el; add description about mailcap.el. @@ -3598,7 +3682,7 @@ 1998-05-05 MORIOKA Tomohiko - * FLIM: Version 1.1.0 (T~ji) was released. + * FLIM: Version 1.1.0 (T-Dòji)-A was released. 1998-05-04 MORIOKA Tomohiko @@ -3634,7 +3718,7 @@ 1998-04-17 MORIOKA Tomohiko - * FLIM: Version 1.0.1 (Ky~to) was released. + * FLIM: Version 1.0.1 (Ky-Dòto)-A was released. * mime-def.el (mime-spadework-module-version-string): New constant. diff --git a/FLIM-API.en b/FLIM-API.en index 623ca7b..ed2a2fd 100644 --- a/FLIM-API.en +++ b/FLIM-API.en @@ -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] -[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] + [Required] + + +[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] -** 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] + + +[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] + [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] -[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] + Return the length of the decoded text. + + If the region can't be decoded, return nil and don't modify the + buffer. + + [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] ** encoded-text diff --git a/FLIM-ELS b/FLIM-ELS index e25bea5..e404504 100644 --- a/FLIM-ELS +++ b/FLIM-ELS @@ -9,11 +9,10 @@ mel mel-q mel-u mel-g eword-decode eword-encode mime mime-parse mmgeneric - mmbuffer mmcooked mmdbuffer mmexternal + mmbuffer mmcooked mmexternal mime-conf sasl sasl-cram sasl-digest - smtp qmtp smtpmail - raw-io)) + smtp qmtp smtpmail)) (setq flim-version-specific-modules '(mailcap)) diff --git a/VERSION b/VERSION index eacced1..960ea11 100644 --- a/VERSION +++ b/VERSION @@ -50,9 +50,9 @@ 1.13.2 Kasanui $(B3^K%(B 1.14.0 Ninokuchi $(B?7%N8}(B 1.14.1 Yagi $(BH,LZ(B ; = $(B6aE4(B $(BBg:e@~(B ------- Yagi-Nishiguchi $(BH,LZ@>8}(B +1.14.2 Yagi-Nishiguchi $(BH,LZ@>8}(B ------ Unebigory-Dòmae-A $(B@&K58fNMA0(B ------- Kashiharajingu-mae $(B3`86?@5\A0(B ; = $(B6aE4(B $(BFnBg:e@~!"5HLn@~(B +------ Kashiharajing-Dþ-mae-A $(B3`86?@5\A0(B ; = $(B6aE4(B $(BFnBg:e@~!"5HLn@~(B [Chao Version names] diff --git a/mel.el b/mel.el index f54132e..5ef5819 100644 --- 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 ;; Created: 1995/6/25 @@ -79,22 +79,77 @@ Content-Transfer-Encoding for it." ;;; @ setting for modules ;;; -(mel-define-backend "7bit") -(mel-define-method-function (mime-encode-string string (nil "7bit")) +;; Returns list of absolute file name and length of data inserted. +(defalias '8bit-insert-encoded-file 'insert-file-contents-as-raw-text) + +(defun 8bit-write-decoded-region (start end filename) + "Decode and write current region encoded by \"8bit\" into FILENAME." + (write-region-as-coding-system 'raw-text 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")) - 'insert-file-contents-as-binary) +(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")) - 'write-region-as-binary) - -(mel-define-backend "8bit" ("7bit")) - -(mel-define-backend "binary" ("8bit")) + start end filename (nil "8bit")) + '8bit-write-decoded-region) + + +(defalias '7bit-insert-encoded-file '8bit-insert-encoded-file) +(defalias '7bit-write-decoded-region '8bit-write-decoded-region) + +(mel-define-backend "7bit" ("8bit")) + + +(defalias 'binary-write-decoded-region 'write-region-as-binary) + +(defalias 'binary-insert-encoded-file 'insert-file-contents-as-binary) + +(defalias 'binary-find-file-noselect 'find-file-noselect-as-binary) + +(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) + selective-display + (default-process-coding-system '(binary . binary)) + (input-coding-system 'binary) + (output-coding-system 'binary) + default-mc-flag mc-flag + program-coding-system-alist + (default-kanji-process-code 0) + default-kanji-flag kanji-flag program-kanji-code-alist) + (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. It won't work with Nemacs." + (let ((coding-system-for-read coding-system) + (coding-system-for-write 'binary) + selective-display + (default-process-coding-system (cons coding-system 'binary)) + (input-coding-system coding-system) + (output-coding-system 'binary) + program-coding-system-alist) + (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) @@ -109,7 +164,7 @@ Content-Transfer-Encoding for it." (mel-define-method-function (mime-encode-region start end (nil "base64")) 'base64-encode-region) (mel-define-method-function (mime-decode-region start end (nil "base64")) - 'base64-decode-region) + 'base64-decode-region) (mel-define-method mime-insert-encoded-file (filename (nil "base64")) "Encode contents of file FILENAME to base64, and insert the result. It calls external base64 encoder specified by @@ -119,10 +174,10 @@ mmencode included in metamail or XEmacs package)." (insert (base64-encode-string (with-temp-buffer (set-buffer-multibyte nil) - (insert-file-contents-as-binary filename) + (binary-insert-encoded-file filename) (buffer-string)))) (or (bolp) (insert ?\n))) - + ;; (mel-define-method-function (encoded-text-encode-string string (nil "B")) ;; 'base64-encode-string) (mel-define-method encoded-text-decode-string (string (nil "B")) diff --git a/mmbuffer.el b/mmbuffer.el index d1fef8d..f0e8643 100644 --- a/mmbuffer.el +++ b/mmbuffer.el @@ -117,9 +117,10 @@ filename) (save-excursion (set-buffer (mime-buffer-entity-buffer-internal entity)) - (write-region-as-binary (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 diff --git a/mmexternal.el b/mmexternal.el index 9da0773..9992156 100644 --- a/mmexternal.el +++ b/mmexternal.el @@ -79,7 +79,7 @@ (concat " *Body of " (mime-entity-name entity) "*")) - (insert-file-contents-as-binary + (binary-insert-encoded-file (mime-external-entity-body-file-internal entity)) (current-buffer)))) (error (message "Can't get external-body."))))) @@ -120,7 +120,7 @@ filename) (mmexternal-require-buffer entity) (with-current-buffer (mime-external-entity-body-buffer-internal entity) - (write-region-as-binary (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 f1f3104..9c5591e 100644 --- a/qmtp.el +++ b/qmtp.el @@ -35,6 +35,7 @@ (require 'poem) (require 'pcustom) +(require 'mel) ; binary-funcall (defgroup qmtp nil "QMTP protocol for sending mail." @@ -127,10 +128,10 @@ called from `qmtp-via-qmtp' with arguments SENDER and RECIPIENTS.") (let (process) (unwind-protect (progn - (as-binary-process - (setq process - (funcall qmtp-open-connection-function - "QMTP" (current-buffer) qmtp-server qmtp-service))) + (setq process + (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 index 5232ffe..0000000 --- a/raw-io.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; raw-io.el --- input/output without code-conversion - -;; Copyright (C) 1997,1998,1999,2000 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko -;; Katsumi Yamaoka -;; 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)) - -(require 'pces) - -(defalias 'binary-insert-file-contents 'insert-file-contents-as-binary) - -(defalias 'binary-write-region 'write-region-as-binary) - -(defalias 'binary-find-file-noselect 'find-file-noselect-as-binary) - -(defalias 'binary-open-network-stream 'open-network-stream-as-binary) - -(defun binary-start-process (name buffer program &rest program-args) - "Like `start-process', q.v., but don't code conversion." - (as-binary-process - (apply (function 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." - (static-if (fboundp 'start-process-shell-command) - (as-binary-process - (apply (function start-process-shell-command) name buffer args)) - (as-binary-process - (start-process name buffer shell-file-name shell-command-switch - (mapconcat (function identity) args " "))))) - -(defalias 'raw-text-insert-file-contents 'insert-file-contents-as-raw-text) - -(defalias 'raw-message-write-region 'write-region-as-raw-text-CRLF) - - -;;; @ end -;;; - -(provide 'raw-io) - -;;; raw-io.el ends here diff --git a/smtp.el b/smtp.el index cb55936..9c82cb0 100644 --- 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 ;; Simon Leinen (ESMTP support) @@ -36,6 +36,7 @@ (require 'mail-utils) ; mail-strip-quoted-names (require 'sasl) (require 'luna) +(require 'mel) ; binary-funcall (defgroup smtp nil "SMTP protocol for sending mail." @@ -234,11 +235,9 @@ to connect to. SERVICE is name of the service desired." 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* ((coding-system-for-read 'binary) - (coding-system-for-write 'binary) - (process - (funcall smtp-open-connection-function - "SMTP" buffer server service)) + (let* ((process + (binary-funcall smtp-open-connection-function + "SMTP" buffer server service)) connection) (when process (setq connection (smtp-make-connection process server service)) diff --git a/smtpmail.el b/smtpmail.el index 8582394..de0f593 100644 --- a/smtpmail.el +++ b/smtpmail.el @@ -47,6 +47,7 @@ (require 'smtp) (require 'sendmail) (require 'time-stamp) +(require 'mel) (eval-when-compile (require 'static)) @@ -245,7 +246,7 @@ This is relative to `smtpmail-queue-dir'.") (insert-buffer tembuf) (or (file-directory-p smtpmail-queue-dir) (make-directory smtpmail-queue-dir t)) - (write-region-as-binary (point-min) (point-max) file-data) + (binary-write-decoded-region (point-min) (point-max) file-data) (set-buffer buffer-elisp) (erase-buffer) (insert (concat