Mercurial > emacs
diff lisp/gnus/mm-decode.el @ 90375:e6bf73e43cf4
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-49
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 164-184)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: man/mh-e.texi (Folders): Various edits.
- Update from erc--emacs--0
* gnus--rel--5.10 (patch 62-70)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 28 Mar 2006 23:08:20 +0000 |
parents | e3bacb89536a ab0b847baba4 |
children | c156f6a9e7b5 |
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el Tue Mar 28 11:24:02 2006 +0000 +++ b/lisp/gnus/mm-decode.el Tue Mar 28 23:08:20 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."