From: ueno Date: Tue, 18 Sep 2007 02:26:01 +0000 (+0000) Subject: Removed OUTPUT arg from epg-start-edit-key & epg-edit-key. X-Git-Tag: opdata-branchpoint~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a414cede78b557639f914b35e2d2ec55b6144484;p=elisp%2Fepg.git Removed OUTPUT arg from epg-start-edit-key & epg-edit-key. --- diff --git a/epg.el b/epg.el index 1081984..aa24a89 100644 --- a/epg.el +++ b/epg.el @@ -1162,8 +1162,11 @@ This function is for internal use only." (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") (let* ((status (match-string 1)) (string (match-string 2)) - (symbol (intern-soft (concat "epg--status-" - status)))) + (symbol (if (eq (epg-context-operation epg-context) + 'edit-key) + #'epg--edit-key-callback + (intern-soft (concat "epg--status-" + status))))) (if (member status epg-pending-status-list) (setq epg-pending-status-list nil)) (if (and symbol @@ -1215,6 +1218,10 @@ This function is for internal use only." (defalias 'epg--decode-coding-string 'decode-coding-string) (defalias 'epg--decode-coding-string 'identity))) +(defun epg--edit-key-callback (context string) + (let ((callback (epg-context-edit-key-callback context))) + (funcall (car callback) (cdr callback)))) + (defun epg--status-USERID_HINT (context string) (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string) (let* ((key-id (match-string 1 string)) @@ -2493,7 +2500,7 @@ If you are unsure, use synchronous version of this function (epg-reset context))) ;;;###autoload -(defun epg-start-edit-key (context key &optional callback handback output) +(defun epg-start-edit-key (context key callback &optional handback) "Initiate an edit key operation. If you use this function, you will need to wait for the completion of @@ -2503,19 +2510,18 @@ If you are unsure, use synchronous version of this function `epg-sign-keys' instead." (epg-context-set-operation context 'edit-key) (epg-context-set-result context nil) - (epg-context-set-edit-key-callback context callback (cons handback output)) + (epg-context-set-edit-key-callback context callback handback) (epg--start context (list "--edit-key" (epg-sub-key-id (car epg-key-sub-key-list key))))) ;;;###autoload -(defun epg-edit-key (context key &optional callback handback output) +(defun epg-edit-key (context key callback &optional handback) "Process the KEY interactively, using the edit CALLBACK with the HANDBACK. The CALLBACK is invoked for every status and command request from -the crypto engine. The output of the crypto engine is written to -the data object OUTPUT." +the crypto engine." (unwind-protect (progn - (epg-start-edit-key context key callback handback output) + (epg-start-edit-key context key callback handback) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) (error "Edit key failed: %S"