From: ueno Date: Wed, 20 Dec 2006 06:33:07 +0000 (+0000) Subject: * epa-file.el (epa-file-write-region): Don't attempt to write the X-Git-Tag: epg-0_0_9~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6ea4768dfc6993c0553985ee7855e8ce51f766a9;p=elisp%2Fepg.git * epa-file.el (epa-file-write-region): Don't attempt to write the region to "/" to determine safe coding-system. --- 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)