From: ueno Date: Thu, 8 Mar 2007 11:09:06 +0000 (+0000) Subject: * epg.el (epg--status-BEGIN_DECRYPTION): New function; reset 'plaintext X-Git-Tag: plaintext-branchpoint~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5863e59e3bc0607351a373e91f9b5446fae081f;p=elisp%2Fepg.git * epg.el (epg--status-BEGIN_DECRYPTION): New function; reset 'plaintext result. (epg--status-DECRYPTION_OKAY): Copy 'plaintext result to 'decrypted-plaintext. --- 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))))