X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=pgg-epg.el;h=69631130f6640bb41eaea383cf4e119175e492e6;hb=c165609a9c48703317640231336ce8fa9e2ee4e9;hp=345cc7cf780cf8bf022a7f77648e3985fe944a33;hpb=835203064557e871f746355568a48c056c3a91e9;p=elisp%2Fepg.git diff --git a/pgg-epg.el b/pgg-epg.el index 345cc7c..6963113 100644 --- a/pgg-epg.el +++ b/pgg-epg.el @@ -30,9 +30,9 @@ (defvar pgg-epg-secret-key-id-list nil) -(defun pgg-epg-passphrase-callback (key-id ignore) +(defun pgg-epg-passphrase-callback (context key-id ignore) (if (eq key-id 'SYM) - (epg-passphrase-callback-function key-id nil) + (epg-passphrase-callback-function context key-id nil) (let* ((entry (assoc key-id epg-user-id-alist)) (passphrase (pgg-read-passphrase @@ -59,10 +59,13 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt. If optional PASSPHRASE is not specified, it will be obtained from the passphrase cache or user." (let ((context (epg-make-context)) + (inhibit-redisplay t) ;Some Gnus users hate flickering cipher) (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode) (epg-context-set-passphrase-callback context #'pgg-epg-passphrase-callback) + (get-buffer-create pgg-output-buffer) + (get-buffer-create pgg-errors-buffer) (condition-case error (setq cipher (epg-encrypt-string context @@ -103,10 +106,13 @@ Decrypt the current region between START and END. If optional PASSPHRASE is not specified, it will be obtained from the passphrase cache or user." (let ((context (epg-make-context)) + (inhibit-redisplay t) ;Some Gnus users hate flickering plain) (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode) (epg-context-set-passphrase-callback context #'pgg-epg-passphrase-callback) + (get-buffer-create pgg-output-buffer) + (get-buffer-create pgg-errors-buffer) (condition-case error (setq plain (epg-decrypt-string context (buffer-substring start end)) pgg-epg-secret-key-id-list nil) @@ -129,10 +135,13 @@ Make detached signature from text between START and END. If optional PASSPHRASE is not specified, it will be obtained from the passphrase cache or user." (let ((context (epg-make-context)) + (inhibit-redisplay t) ;Some Gnus users hate flickering signature) (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode) (epg-context-set-passphrase-callback context #'pgg-epg-passphrase-callback) + (get-buffer-create pgg-output-buffer) + (get-buffer-create pgg-errors-buffer) (condition-case error (setq signature (epg-sign-string context @@ -158,9 +167,12 @@ passphrase cache or user." "This function is for internal use only. Verify region between START and END as the detached signature SIGNATURE." - (let ((context (epg-make-context))) + (let ((context (epg-make-context)) + (inhibit-redisplay t)) ;Some Gnus users hate flickering (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode) + (get-buffer-create pgg-output-buffer) + (get-buffer-create pgg-errors-buffer) (if signature (epg-verify-string context (with-temp-buffer @@ -181,6 +193,7 @@ Verify region between START and END as the detached signature SIGNATURE." Insert public key at point." (let ((context (epg-make-context)) + (inhibit-redisplay t) ;Some Gnus users hate flickering pointer) (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode) @@ -191,6 +204,7 @@ Insert public key at point." Add all public keys in region between START and END to the keyring." (let ((context (epg-make-context)) + (inhibit-redisplay t) ;Some Gnus users hate flickering pointer) (epg-context-set-armor context t) (epg-context-set-textmode context pgg-text-mode)