From 94090541e9c08d9b15433af7af0204b3017c81d5 Mon Sep 17 00:00:00 2001 From: hmurata Date: Tue, 30 May 2006 10:42:16 +0000 Subject: [PATCH] (epa-file-write-region): Encode the plain text with coding-system-for-write. --- ChangeLog | 5 +++++ epa-file.el | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99e6fd3..1b360b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-30 Hiroya Murata + + * epa-file.el (epa-file-write-region): Encode the plain text with + coding-system-for-write. + 2006-05-30 Daiki Ueno * epa-file.el (epa-file-insert-file-contents): diff --git a/epa-file.el b/epa-file.el index e991ab4..2c123c3 100644 --- a/epa-file.el +++ b/epa-file.el @@ -116,11 +116,12 @@ (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) -- 1.7.10.4