# HG changeset patch # User Miles Bader # Date 1143157893 0 # Node ID ab0b847baba41834a3f43a6baea45be93db49f09 # Parent 5b7d2d04f5c1d9697fe90a5c46a5a73a94bb5d00 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-176 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 67) - Update from CVS diff -r 5b7d2d04f5c1 -r ab0b847baba4 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Mar 23 23:51:09 2006 +0000 +++ b/lisp/gnus/ChangeLog Thu Mar 23 23:51:33 2006 +0000 @@ -1,3 +1,11 @@ +2006-03-23 Katsumi Yamaoka + + * mml.el (mml-insert-mime): Ignore cached contents of + message/external-body part. + + * mm-decode.el (mm-get-part): Add optional 'no-cache' argument. + (mm-insert-part): Ditto. + 2006-03-22 Katsumi Yamaoka * gnus-sum.el (gnus-map-articles): Don't funcall symbol macro. diff -r 5b7d2d04f5c1 -r ab0b847baba4 lisp/gnus/mm-decode.el --- a/lisp/gnus/mm-decode.el Thu Mar 23 23:51:09 2006 +0000 +++ b/lisp/gnus/mm-decode.el Thu Mar 23 23:51:33 2006 +0000 @@ -1103,9 +1103,12 @@ (put 'mm-with-part 'lisp-indent-function 1) (put 'mm-with-part 'edebug-form-spec '(body)) -(defun mm-get-part (handle) - "Return the contents of HANDLE as a string." - (if (equal (mm-handle-media-type handle) "message/external-body") +(defun mm-get-part (handle &optional no-cache) + "Return the contents of HANDLE as a string. +If NO-CACHE is non-nil, cached contents of a message/external-body part +are ignored." + (if (and (not no-cache) + (equal (mm-handle-media-type handle) "message/external-body")) (progn (unless (mm-handle-cache handle) (mm-extern-cache-contents handle)) @@ -1114,8 +1117,10 @@ (mm-with-part handle (buffer-string)))) -(defun mm-insert-part (handle) - "Insert the contents of HANDLE in the current buffer." +(defun mm-insert-part (handle &optional no-cache) + "Insert the contents of HANDLE in the current buffer. +If NO-CACHE is non-nil, cached contents of a message/external-body part +are ignored." (save-excursion (insert (cond ((eq (mail-content-type-get (mm-handle-type handle) 'charset) @@ -1123,9 +1128,9 @@ (with-current-buffer (mm-handle-buffer handle) (buffer-string))) ((mm-multibyte-p) - (mm-string-as-multibyte (mm-get-part handle))) + (mm-string-as-multibyte (mm-get-part handle no-cache))) (t - (mm-get-part handle)))))) + (mm-get-part handle no-cache)))))) (defun mm-file-name-delete-whitespace (file-name) "Remove all whitespace characters from FILE-NAME." diff -r 5b7d2d04f5c1 -r ab0b847baba4 lisp/gnus/mml.el --- a/lisp/gnus/mml.el Thu Mar 23 23:51:09 2006 +0000 +++ b/lisp/gnus/mml.el Thu Mar 23 23:51:33 2006 +0000 @@ -793,7 +793,7 @@ (unless (setq textp (equal (mm-handle-media-supertype handle) "text")) (save-excursion (set-buffer (setq buffer (mml-generate-new-buffer " *mml*"))) - (mm-insert-part handle) + (mm-insert-part handle 'no-cache) (if (setq mmlp (equal (mm-handle-media-type handle) "message/rfc822")) (mime-to-mml)))))