From: hmurata Date: Fri, 26 May 2006 17:28:29 +0000 (+0000) Subject: (wl-mime-pgp-verify-region): Does not use temporary X-Git-Tag: wl-2_15_4~39 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ba722bf1fa21b796fbea53d15337fc7ac27bae69;p=elisp%2Fwanderlust.git (wl-mime-pgp-verify-region): Does not use temporary buffer. Use epa-display-verify-result. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6cdf95c..a2b705c 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Hiroya Murata + + * wl-mime.el (wl-mime-pgp-verify-region): Does not use temporary + buffer. Use epa-display-verify-result. + 2006-05-18 Yoichi NAKAYAMA * wl-draft.el (wl-draft-send): Continue even if setting parent diff --git a/wl/wl-mime.el b/wl/wl-mime.el index f5e4fc4..267ae06 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -490,21 +490,17 @@ It calls following-method selected from variable (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)