diff lisp/gnus/mm-decode.el @ 108290:afc774335f7e

Synch with Gnus trunk. Note: Julien has already sent a form to FSF to sign a paper. 2010-05-07 Julien Danjou <julien@danjou.info> * gnus-art.el (gnus-mime-pipe-part): Add optional argument `cmd'; pass it to mm-pipe-part. * mm-decode.el (mm-pipe-part): Add optional argument `cmd'; use it if it is given.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 07 May 2010 07:28:15 +0000
parents 1e23ce3cbd8b
children 5f352fd4346a
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el	Fri May 07 07:11:49 2010 +0000
+++ b/lisp/gnus/mm-decode.el	Fri May 07 07:28:15 2010 +0000
@@ -1301,12 +1301,13 @@
 	  (mm-write-region (point-min) (point-max) file nil nil nil 'binary t)
 	(set-default-file-modes current-file-modes)))))
 
-(defun mm-pipe-part (handle)
-  "Pipe HANDLE to a process."
-  (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
-	 (command
-	  (gnus-read-shell-command
-           "Shell command on MIME part: " mm-last-shell-command)))
+(defun mm-pipe-part (handle &optional cmd)
+  "Pipe HANDLE to a process.
+Use CMD as the process."
+  (let ((name (mail-content-type-get (mm-handle-type handle) 'name))
+	(command (or cmd
+		     (gnus-read-shell-command
+		      "Shell command on MIME part: " mm-last-shell-command))))
     (mm-with-unibyte-buffer
       (mm-insert-part handle)
       (mm-add-meta-html-tag handle)