(epa-file-write-region): Encode the plain text with
authorhmurata <hmurata>
Tue, 30 May 2006 10:42:16 +0000 (10:42 +0000)
committerhmurata <hmurata>
Tue, 30 May 2006 10:42:16 +0000 (10:42 +0000)
coding-system-for-write.

ChangeLog
epa-file.el

index 99e6fd3..1b360b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-30  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * epa-file.el (epa-file-write-region): Encode the plain text with
+       coding-system-for-write.
+
 2006-05-30  Daiki Ueno  <ueno@unixuser.org>
 
        * epa-file.el (epa-file-insert-file-contents):
index e991ab4..2c123c3 100644 (file)
   (if append
       (error "Can't append to the file."))
   (setq file (expand-file-name file))
-  (let* ((coding-system (if (boundp 'last-coding-system-used)
-                           (condition-case nil
-                               (write-region (point-min) (point-max) "/")
-                             (error last-coding-system-used))
-                         buffer-file-coding-system))
+  (let* ((coding-system (or coding-system-for-write
+                           (if (boundp 'last-coding-system-used)
+                               (condition-case nil
+                                   (write-region (point-min) (point-max) "/")
+                                 (error last-coding-system-used))
+                             buffer-file-coding-system)))
         (context (epg-make-context))
         (coding-system-for-write 'binary)
         string entry)