From f5b71bc0d6de35ff97571d7b933b8ba8e8bbb1bb Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 11 Oct 2011 05:51:09 +0000 Subject: [PATCH] Bugfix: message.el (message-signed-or-encrypted-p): Exclude header when checking if there is signed or encrypted body in text/plain message. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/message.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9c76635fb63..a4c2d97403b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-10-11 Katsumi Yamaoka + + * message.el (message-signed-or-encrypted-p): Exclude header when + checking if there is signed or encrypted body in text/plain message. + 2011-10-09 Andreas Schwab * html2text.el (html2text-get-attr): Correctly handle attribute values diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 7203ef69a14..948892d1e13 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7429,14 +7429,16 @@ is for the internal use." (with-temp-buffer (insert-buffer-substring cur) (when (setq handles (mm-dissect-buffer t t)) - (if (and (prog1 - (bufferp (car handles)) - (mm-destroy-parts handles)) + (if (and (bufferp (car handles)) (equal (mm-handle-media-type handles) "text/plain")) (progn + (erase-buffer) + (insert-buffer-substring (car handles)) (mm-decode-content-transfer-encoding (mm-handle-encoding handles)) + (mm-destroy-parts handles) (setq handles (mm-uu-dissect))) + (mm-destroy-parts handles) (setq handles nil)))))) (when handles (prog1 -- 2.39.2