+1999-11-11 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * mml.el (mml-insert-tag): Don't close the tag.
+ (mml-insert-empty-tag): New function.
+ (mml-attach-file): Use mml-insert-empty-tag instead of
+ mml-insert-tag.
+ (mml-attach-buffer): Ditto.
+ (mml-attach-external): Ditto.
+ (mml-insert-multipart): Ditto.
+
1999-12-03 08:49:53 Shenghuo ZHU <zsh@cs.rochester.edu>
* nnfolder.el (nnfolder-request-article): Return -1 if not find
(when (string-match "[\"\\~/* \t\n]" value)
(setq value (prin1-to-string value)))
(insert (format " %s=%s" key value)))))
- (insert ">\n<#/" name ">\n"))
+ (insert ">\n"))
+
+(defun mml-insert-empty-tag (name &rest plist)
+ "Insert an empty MML tag described by NAME and PLIST."
+ (when (symbolp name)
+ (setq name (symbol-name name)))
+ (apply #'mml-insert-tag name plist)
+ (insert "<#/" name ">\n"))
;;; Attachment functions.
(type (mml-minibuffer-read-type file))
(description (mml-minibuffer-read-description)))
(list file type description)))
- (mml-insert-tag 'part 'type type 'filename file 'disposition "attachment"
- 'description description))
+ (mml-insert-empty-tag 'part 'type type 'filename file
+ 'disposition "attachment" 'description description))
(defun mml-attach-buffer (buffer &optional type description)
"Attach a buffer to the outgoing MIME message.
(type (mml-minibuffer-read-type buffer "text/plain"))
(description (mml-minibuffer-read-description)))
(list buffer type description)))
- (mml-insert-tag 'part 'type type 'buffer buffer 'disposition "attachment"
- 'description description))
+ (mml-insert-empty-tag 'part 'type type 'buffer buffer
+ 'disposition "attachment" 'description description))
(defun mml-attach-external (file &optional type description)
"Attach an external file into the buffer.
(type (mml-minibuffer-read-type file))
(description (mml-minibuffer-read-description)))
(list file type description)))
- (mml-insert-tag 'external 'type type 'name file 'disposition "attachment"
- 'description description))
+ (mml-insert-empty-tag 'external 'type type 'name file
+ 'disposition "attachment" 'description description))
(defun mml-insert-multipart (&optional type)
(interactive (list (completing-read "Multipart type (default mixed): "
nil nil "mixed")))
(or type
(setq type "mixed"))
- (mml-insert-tag "multipart" 'type type)
+ (mml-insert-empty-tag "multipart" 'type type)
(forward-line -1))
(defun mml-preview (&optional raw)