+2006-05-26 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-mime.el (wl-mime-pgp-verify-region): Does not use temporary
+ buffer. Use epa-display-verify-result.
+
2006-05-18 Yoichi NAKAYAMA <yoichi@geiin.org>
* wl-draft.el (wl-draft-send): Continue even if setting parent
(defun wl-mime-pgp-verify-region (beg end &optional coding-system)
(require 'epg)
- (let ((message-buffer (current-buffer))
- (context (epg-make-context)))
+ (let ((context (epg-make-context)))
(epg-verify-string
context
- (with-temp-buffer
- (insert-buffer-substring message-buffer beg end)
- (when coding-system
- (encode-coding-region (point-min) (point-max) coding-system))
- (goto-char (point-min))
- (while (search-forward "\n" nil t)
- (replace-match "\r\n"))
- (buffer-substring (point-min) (point-max))))
- (message "%s"
- (epg-verify-result-to-string
- (epg-context-result-for context 'verify))))))
+ (encode-coding-string
+ (buffer-substring beg end)
+ (if coding-system
+ (coding-system-change-eol-conversion coding-system 'dos)
+ 'raw-text-dos)))
+ (when (epg-context-result-for context 'verify)
+ (epa-display-verify-result
+ (epg-context-result-for context 'verify))))))
((require 'pgg nil t)
(defun wl-mime-pgp-decrypt-region (beg end &optional no-decode)