From: ueno Date: Fri, 31 Aug 2007 05:36:22 +0000 (+0000) Subject: (epa-verify-region): Decode the plaintext by X-Git-Tag: epg-0_0_15~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4666d08390c74abf44111db9c237d105f8b48538;p=elisp%2Fepg.git (epa-verify-region): Decode the plaintext by coding-system-for-read or one which can be saved in epa-coding-system-used. --- diff --git a/ChangeLog b/ChangeLog index 8e4cff8..78fb3b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-08-31 Daiki Ueno + + * epa.el (epa-verify-region): Decode the plaintext by + coding-system-for-read or one which can be saved in + epa-coding-system-used. + 2007-08-02 Adrian Aichner (tiny change) * epa.el (epa-validity-high): Fix load error by adding missing diff --git a/epa.el b/epa.el index de99999..5442f23 100644 --- a/epa.el +++ b/epa.el @@ -858,23 +858,28 @@ Don't use this command in Lisp programs!" (epg-context-set-progress-callback context #'epa-progress-callback-function "Verifying...") + (message "Verifying...") (setq plain (epg-verify-string context (epa--encode-coding-string (buffer-substring start end) (or coding-system-for-write - (get-text-property start - 'epa-coding-system-used))))) + (get-text-property start 'epa-coding-system-used))))) + (message "Verifying...done") + (setq plain (epa--decode-coding-string + plain + (or coding-system-for-read + (get-text-property start 'epa-coding-system-used)))) (if (y-or-n-p "Replace the original text? ") (let ((inhibit-read-only t) buffer-read-only) (delete-region start end) (goto-char start) (insert plain)) - (with-output-to-temp-buffer "*Temp*" - (set-buffer standard-output) - (insert plain) - (epa-info-mode))) + (with-output-to-temp-buffer "*Temp*" + (set-buffer standard-output) + (insert plain) + (epa-info-mode))) (if (epg-context-result-for context 'verify) (epa-display-info (epg-verify-result-to-string (epg-context-result-for context 'verify))))))