From: ueno Date: Wed, 12 Apr 2006 11:10:00 +0000 (+0000) Subject: * epg.el (epg-status-GET_BOOL): New function. X-Git-Tag: epgsm-branchpoint~97 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95ff40c9179c88308fe96e1adb0ef220b67f265c;p=elisp%2Fepg.git * epg.el (epg-status-GET_BOOL): New function. (epg-status-GET_LINE): New function. (epg-prompt-alist): New variable, to be filled. --- diff --git a/ChangeLog b/ChangeLog index d806240..9261463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-04-12 Daiki Ueno + * epg.el (epg-status-GET_BOOL): New function. + (epg-status-GET_LINE): New function. + (epg-prompt-alist): New variable, to be filled. + * pgg-epg.el (mml2015-gpg-extract-signature-details): New function. * epg.el (epg-signature-fingerprint): New function. (epg-signature-set-fingerprint): New function. diff --git a/epg.el b/epg.el index da830fd..de72571 100644 --- a/epg.el +++ b/epg.el @@ -84,6 +84,8 @@ This is used by `epg-list-keys'.") (user-id "[^:]+")) "The schema of keylisting output whose type is \"uid\". This is used by `epg-list-keys'.") + +(defvar epg-prompt-alist nil) (defun epg-make-context (&optional protocol armor textmode include-certs) "Return a context object." @@ -363,6 +365,17 @@ This function is for internal use only." (if string (fillarray string 0)))))) +(defun epg-status-GET_BOOL (process string) + (let ((entry (assoc string epg-prompt-alist))) + (if (y-or-n-p (if entry (cdr entry) (concat string "? "))) + (process-send-string process "y\n") + (process-send-string process "n\n")))) + +(defun epg-status-GET_LINE (process string) + (let* ((entry (assoc string epg-prompt-alist)) + (string (read-string (if entry (cdr entry) (concat string ": "))))) + (process-send-string process (concat string "\n"))))) + (defun epg-status-GOODSIG (process string) (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string) (epg-context-set-result-for