(epa-encrypt): New command.
(epa-import-armor-in-region): New command.
(epa-import): New command.
+ (epa-decrypt-region): Confirm user to replace the region.
2006-12-29 Daiki Ueno <ueno@unixuser.org>
(message "Decrypting...")
(setq plain (epg-decrypt-string context (buffer-substring start end)))
(message "Decrypting...done")
- (delete-region start end)
- (goto-char start)
- (insert (epa--decode-coding-string plain
- (or coding-system-for-read
- (get-text-property
- start 'epa-coding-system-used))))
+ (setq plain (epa--decode-coding-string
+ plain
+ (or coding-system-for-read
+ (get-text-property start 'epa-coding-system-used))))
+ (if (y-or-n-p "Replace the text in the region? ")
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (delete-region start end)
+ (goto-char start)
+ (insert plain))
+ (let ((epa-popup-info-window t))
+ (epa-display-info plain)))
(if (epg-context-result-for context 'verify)
(epa-display-info (epg-verify-result-to-string
(epg-context-result-for context 'verify)))))))