- (setq cipher (epg-encrypt-string context (buffer-substring start end)
- (if pgg-encrypt-for-me
- (cons pgg-default-user-id recipients)
- recipients)
- sign t))
+ (epg-context-set-passphrase-callback context #'pgg-epg-passphrase-callback)
+ (condition-case error
+ (setq cipher
+ (epg-encrypt-string context
+ (buffer-substring start end)
+ (mapcar
+ (lambda (recipient)
+ (car (epg-list-keys recipient)))
+ (if pgg-encrypt-for-me
+ (cons pgg-default-user-id recipients)
+ recipients))
+ sign t)
+ pgg-epg-secret-key-id-list nil)
+ (error
+ (while pgg-epg-secret-key-id-list
+ (pgg-remove-passphrase-from-cache (car pgg-epg-secret-key-id-list))
+ (setq pgg-epg-secret-key-id-list (cdr pgg-epg-secret-key-id-list)))
+ (signal (car error) (cdr error))))