emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/mm-decode.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/mm-decode.el
Date: Thu, 23 Mar 2006 23:51:33 +0000

Index: emacs/lisp/gnus/mm-decode.el
diff -u emacs/lisp/gnus/mm-decode.el:1.35 emacs/lisp/gnus/mm-decode.el:1.36
--- emacs/lisp/gnus/mm-decode.el:1.35   Sun Mar 19 19:39:53 2006
+++ emacs/lisp/gnus/mm-decode.el        Thu Mar 23 23:51:33 2006
@@ -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."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]