(save-excursion
(let ((context (epg-make-context))
signature)
- ;;(epg-context-set-armor context epa-armor)
- (epg-context-set-armor context t)
- ;;(epg-context-set-textmode context epa-textmode)
- (epg-context-set-textmode context t)
+ (if (memq mode '(t detached nil normal))
+ ;; Normal or detached signature.
+ (progn
+ ;;(epg-context-set-armor context epa-armor)
+ (epg-context-set-armor context t)
+ ;;(epg-context-set-textmode context epa-textmode)
+ (epg-context-set-textmode context t))
+ ;; Cleartext signature.
+ (epg-context-set-armor context nil)
+ (epg-context-set-textmode context nil))
(epg-context-set-signers context signers)
(epg-context-set-passphrase-callback context
#'epa-passphrase-callback-function)