[gnus git] branch master updated: m0-3-137-g7c5935d =1= (mml-generate-mime): Allow specifying what the top-level part type is

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  7c5935db501e6c5c141587043053718df343316e (commit)
      from  9b3a32e470c1bcb580f6edce48b64451c25a1d9b (commit)


- Log -----------------------------------------------------------------
commit 7c5935db501e6c5c141587043053718df343316e
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Wed Apr 11 00:35:08 2012 +0200

    (mml-generate-mime): Allow specifying what the top-level part type is

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9c8a9d2..e259e48 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2012-04-10  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* mml.el (mml-generate-mime): Allow specifying what the top-level part
+	type is.
+
 	* gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus
 	`unexists' entries.
 	(gnus-clean-old-newsrc): Fix last checkin.
diff --git a/lisp/mml.el b/lisp/mml.el
index a9901d7..cc1aedf 100644
--- a/lisp/mml.el
+++ b/lisp/mml.el
@@ -463,8 +463,10 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
 (defvar mml-multipart-number 0)
 (defvar mml-inhibit-compute-boundary nil)
 
-(defun mml-generate-mime ()
-  "Generate a MIME message based on the current MML document."
+(defun mml-generate-mime (&optional multipart-type)
+  "Generate a MIME message based on the current MML document.
+MULTIPART-TYPE defaults to \"mixed\", but can also
+be \"related\" or \"alternate\"."
   (let ((cont (mml-parse))
 	(mml-multipart-number mml-multipart-number)
 	(options message-options))
@@ -476,7 +478,8 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
 	    (if (and (consp (car cont))
 		     (= (length cont) 1))
 		(mml-generate-mime-1 (car cont))
-	      (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed"))
+	      (mml-generate-mime-1
+	       (nconc (list 'multipart (cons 'type (or multipart-type "mixed")))
 					  cont)))
 	    (setq options message-options)
 	    (buffer-string))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    3 +++
 lisp/mml.el    |   11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.