* mel-b-ccl.el (base64-ccl-insert-encoded-file): Use
authorhmurata <hmurata>
Mon, 12 Jun 2006 15:10:02 +0000 (15:10 +0000)
committerhmurata <hmurata>
Mon, 12 Jun 2006 15:10:02 +0000 (15:10 +0000)
`insert-file-contents-as-binary' instead of `insert-file-contents'.

* mel-q-ccl.el (quoted-printable-ccl-insert-encoded-file):
Likewise.

ChangeLog
mel-b-ccl.el
mel-q-ccl.el

index 4265f55..2431a22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-12  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * smtp.el (smtp-debug): New user option.
index 4a82772..69e178b 100644 (file)
@@ -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)
index 3769fb9..cccacd8 100644 (file)
@@ -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"))