From c9bb0e1a7a1dc590c55780b5956d839db4ebcc0f Mon Sep 17 00:00:00 2001 From: hmurata Date: Mon, 12 Jun 2006 15:10:02 +0000 Subject: [PATCH] * mel-b-ccl.el (base64-ccl-insert-encoded-file): Use `insert-file-contents-as-binary' instead of `insert-file-contents'. * mel-q-ccl.el (quoted-printable-ccl-insert-encoded-file): Likewise. --- ChangeLog | 8 ++++++++ mel-b-ccl.el | 10 +++++++--- mel-q-ccl.el | 10 +++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4265f55..2431a22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-06-12 Hiroya Murata + + * mel-b-ccl.el (base64-ccl-insert-encoded-file): Use + `insert-file-contents-as-binary' instead of `insert-file-contents'. + + * mel-q-ccl.el (quoted-printable-ccl-insert-encoded-file): + Likewise. + 2006-02-18 Hiroya Murata * smtp.el (smtp-debug): New user option. diff --git a/mel-b-ccl.el b/mel-b-ccl.el index 4a82772..69e178b 100644 --- a/mel-b-ccl.el +++ b/mel-b-ccl.el @@ -419,9 +419,13 @@ abcdefghijklmnopqrstuvwxyz\ (defun base64-ccl-insert-encoded-file (filename) "Encode contents of file FILENAME to base64, and insert the result." (interactive "*fInsert encoded file: ") - (let ((coding-system-for-read 'mel-ccl-base64-lf-rev) - format-alist) - (insert-file-contents filename))) + (insert + (decode-coding-string + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-as-binary filename) + (buffer-string)) + 'mel-ccl-base64-lf-rev))) (mel-define-method-function (mime-encode-string string (nil "base64")) 'base64-ccl-encode-string) diff --git a/mel-q-ccl.el b/mel-q-ccl.el index 3769fb9..cccacd8 100644 --- a/mel-q-ccl.el +++ b/mel-q-ccl.el @@ -898,9 +898,13 @@ abcdefghijklmnopqrstuvwxyz\ (defun quoted-printable-ccl-insert-encoded-file (filename) "Encode contents of the file named as FILENAME, and insert it." (interactive "*fInsert encoded file: ") - (let ((coding-system-for-read 'mel-ccl-quoted-printable-lf-lf-rev) - format-alist) - (insert-file-contents filename))) + (insert + (decode-coding-string + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-as-binary filename) + (buffer-string)) + 'mel-ccl-quoted-printable-lf-lf-rev))) (mel-define-method-function (mime-encode-string string (nil "quoted-printable")) -- 1.7.10.4