From a5863e59e3bc0607351a373e91f9b5446fae081f Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 8 Mar 2007 11:09:06 +0000 Subject: [PATCH] * epg.el (epg--status-BEGIN_DECRYPTION): New function; reset 'plaintext result. (epg--status-DECRYPTION_OKAY): Copy 'plaintext result to 'decrypted-plaintext. --- ChangeLog | 4 ++++ epg.el | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcd824e..a9b4c51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ (epg-wait-for-plaintext): New function. (epg--status-PLAINTEXT_LENGTH): New function. (epg-decrypt-string): Don't use a temp output file. + (epg--status-BEGIN_DECRYPTION): New function; reset 'plaintext + result. + (epg--status-DECRYPTION_OKAY): Copy 'plaintext result to + 'decrypted-plaintext. 2007-03-08 Daiki Ueno diff --git a/epg.el b/epg.el index 3b09c8f..d94a4cb 100644 --- a/epg.el +++ b/epg.el @@ -1497,11 +1497,18 @@ This function is for internal use only." (if (consp (epg-context-progress-callback context)) (cdr (epg-context-progress-callback context)))))) +(defun epg--status-BEGIN_DECRYPTION (context string) + (epg-context-set-result-for context 'plaintext nil)) + (defun epg--status-DECRYPTION_FAILED (context string) (epg-context-set-result-for context 'decryption-failed t)) (defun epg--status-DECRYPTION_OKAY (context string) - (epg-context-set-result-for context 'decryption-okay t)) + (epg-context-set-result-for context 'decryption-okay t) + (epg-context-set-result-for + context + 'decrypted-plaintext + (epg-context-result-for context 'plaintext))) (defun epg--status-PLAINTEXT_LENGTH (context string) (when (string-match "\\`\\([0-9]+\\)" string) @@ -1967,7 +1974,7 @@ If PLAIN is nil, it returns the result as a string." (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (epg--check-error-for-decrypt context) - (epg-context-result-for context 'plaintext)) + (epg-context-result-for context 'decrypted-plaintext)) (if (file-exists-p input-file) (delete-file input-file)) (epg-reset context)))) -- 1.7.10.4