From: ueno Date: Thu, 19 Apr 2007 04:53:43 +0000 (+0000) Subject: * epa-file.el (epa-file-insert-file-contents): Guess the value of X-Git-Tag: epg-0_0_12~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2527d6021e08a02b6575effebd57c5d452fdf11d;p=elisp%2Fepg.git * epa-file.el (epa-file-insert-file-contents): Guess the value of epa-file-encrypt-to from 'encrypted-to context-result. * epg.el (epg--status-ENC_TO): New function. --- diff --git a/ChangeLog b/ChangeLog index b8af488..ffef65e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-19 Daiki Ueno + + * epa-file.el (epa-file-insert-file-contents): Guess the value of + epa-file-encrypt-to from 'encrypted-to context-result. + * epg.el (epg--status-ENC_TO): New function. + 2007-04-04 Daiki Ueno Chris Moore diff --git a/epa-file.el b/epa-file.el index 777a1a9..68f9801 100644 --- a/epa-file.el +++ b/epa-file.el @@ -164,6 +164,9 @@ May either be a string or a list of strings.") (setcdr entry nil)) (signal 'file-error (cons "Opening input file" (cdr error))))) + (make-local-variable 'epa-file-encrypt-to) + (setq epa-file-encrypt-to + (mapcar #'car (epg-context-result-for context 'encrypted-to))) (if (or beg end) (setq string (substring string (or beg 0) end))) (save-excursion diff --git a/epg.el b/epg.el index 7993b48..914da2b 100644 --- a/epg.el +++ b/epg.el @@ -1491,6 +1491,15 @@ This function is for internal use only." (if (consp (epg-context-progress-callback context)) (cdr (epg-context-progress-callback context)))))) +(defun epg--status-ENC_TO (context string) + (if (string-match "\\`\\([0-9A-Za-z]+\\) \\([0-9]+\\) \\([0-9]+\\)" string) + (epg-context-set-result-for + context 'encrypted-to + (cons (list (match-string 1 string) + (string-to-number (match-string 2 string)) + (string-to-number (match-string 3 string))) + (epg-context-result-for context 'encrypted-to))))) + (defun epg--status-DECRYPTION_FAILED (context string) (epg-context-set-result-for context 'decryption-failed t))