From 92e9c620b48a080bda4fc801e3f63378437ed78b Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 11 Oct 2011 05:49:46 +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/ChangeLog | 5 +++++ lisp/message.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fee6949d0..83243e728 100644 --- a/lisp/ChangeLog +++ b/lisp/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/message.el b/lisp/message.el index c6ea7ad19..7f56ed63c 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -7473,14 +7473,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.25.1