From ba722bf1fa21b796fbea53d15337fc7ac27bae69 Mon Sep 17 00:00:00 2001 From: hmurata Date: Fri, 26 May 2006 17:28:29 +0000 Subject: [PATCH] (wl-mime-pgp-verify-region): Does not use temporary buffer. Use epa-display-verify-result. --- wl/ChangeLog | 5 +++++ wl/wl-mime.el | 22 +++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) 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) -- 1.7.10.4