Bugfix: message.el (message-signed-or-encrypted-p): Exclude header when checking...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 11 Oct 2011 05:49:46 +0000 (05:49 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 11 Oct 2011 05:49:46 +0000 (05:49 +0000)
lisp/ChangeLog
lisp/message.el

index fee6949..83243e7 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-11  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * 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  <schwab@linux-m68k.org>
 
        * html2text.el (html2text-get-attr): Correctly handle attribute values
index c6ea7ad..7f56ed6 100644 (file)
@@ -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