From a9a936b98858c8f2a88ec24f5ef0216299c1fec8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 6 Jul 2011 12:48:37 -0400 Subject: [PATCH] Fix rmail mime search bug when entity is a string. --- lisp/ChangeLog | 3 +++ lisp/mail/rmailmm.el | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2b389f4fe4..6625790370e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,9 @@ (rmail-mime-toggle-hidden): Likewise, for showing. (rmail-mime-process-multipart): Record when an entity is truncated. + * mail/rmailmm.el (rmail-search-mime-message): Don't get confused + if ENTITY is a string. + 2011-07-06 Lars Magne Ingebrigtsen * emacs-lisp/lisp-mode.el (eval-defun-1): Update the documentation diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 5b8405dc499..6f1bce03ee9 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -1408,6 +1408,8 @@ This is the usual value of `rmail-insert-mime-forwarded-message-function'." (re-search-forward regexp nil t)) ;; Next, search the body. (if (and entity + ;; RMS: I am not sure why, but sometimes this is a string. + (not (stringp entity)) (let* ((content-type (rmail-mime-entity-type entity)) (charset (cdr (assq 'charset (cdr content-type))))) (or (not (string-match "text/.*" (car content-type))) -- 2.39.2