From 6ea4768dfc6993c0553985ee7855e8ce51f766a9 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 20 Dec 2006 06:33:07 +0000 Subject: [PATCH] * epa-file.el (epa-file-write-region): Don't attempt to write the region to "/" to determine safe coding-system. --- ChangeLog | 3 +++ epa-file.el | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa4e5b3..a68579f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-12-20 Daiki Ueno + * epa-file.el (epa-file-write-region): Don't attempt to write the + region to "/" to determine safe coding-system. + * epa.el (epa-list-keys): Abolished PROTOCOL arg. (epa-sign-file): Save the output to *.p7s or *.p7m file if epa-protocol is CMS. diff --git a/epa-file.el b/epa-file.el index f086f90..1f939c1 100644 --- a/epa-file.el +++ b/epa-file.el @@ -164,10 +164,9 @@ May either be a string or a list of strings.") (error "Can't append to the file.")) (setq file (expand-file-name file)) (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)) + (if (fboundp 'select-safe-coding-system) + (select-safe-coding-system + (point-min) (point-max)) buffer-file-coding-system))) (context (epg-make-context)) (coding-system-for-write 'binary) -- 1.7.10.4