(let* ((pair (mml-secure-epg-sign 'OpenPGP 'clear))
(signature (car pair)))
(delete-region (point-min) (point-max))
- (mm-with-unibyte-current-buffer
- (insert signature)
- (goto-char (point-min))
- (while (re-search-forward "\r+$" nil t)
- (replace-match "" t t))
- (when cte
- (mm-encode-content-transfer-encoding cte))
- (goto-char (point-min))
- (when headers
- (insert headers))
- (insert "\n"))
+ (insert
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert signature)
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (when cte
+ (mm-encode-content-transfer-encoding cte))
+ (goto-char (point-min))
+ (when headers
+ (insert headers))
+ (insert "\n")
+ (buffer-string)))
t)))
(defun mml1991-epg-encrypt (cont &optional sign)