From: Richard M. Stallman Date: Wed, 6 Jul 2011 16:48:37 +0000 (-0400) Subject: Fix rmail mime search bug when entity is a string. X-Git-Tag: emacs-pretest-24.0.90~104^2~419^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a9a936b98858c8f2a88ec24f5ef0216299c1fec8;p=emacs.git Fix rmail mime search bug when entity is a string. --- 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)))