From: morioka Date: Wed, 11 Mar 1998 07:04:30 +0000 (+0000) Subject: (mime-edit-insert-text): New optional argument `subtype'. X-Git-Tag: JR-Himi-~46 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7422c9f4b35d2807d8ba971ee92450a86ae310ac;p=elisp%2Fsemi.git (mime-edit-insert-text): New optional argument `subtype'. --- diff --git a/mime-edit.el b/mime-edit.el index 2b6c125..12a990b 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1011,26 +1011,27 @@ just return to previous mode." (princ (documentation 'mime-edit-mode)) (print-help-return-message))) -(defun mime-edit-insert-text () +(defun mime-edit-insert-text (&optional subtype) "Insert a text message. -Charset is automatically obtained from the `charsets-mime-charset-alist'." +Charset is automatically obtained from the `charsets-mime-charset-alist'. +If optional argument SUBTYPE is not nil, text/SUBTYPE tag is inserted." (interactive) - (let ((ret (mime-edit-insert-tag "text" nil nil))) - (if ret - (progn - (if (looking-at mime-edit-single-part-tag-regexp) - (progn - ;; Make a space between the following message. - (insert "\n") - (forward-char -1) - )) - (if (and (member (cadr ret) '("enriched" "richtext")) - (fboundp 'enriched-mode) - ) - (enriched-mode t) - (if (boundp 'enriched-mode) - (enriched-mode -1) - )))))) + (let ((ret (mime-edit-insert-tag "text" subtype nil))) + (when ret + (if (looking-at mime-edit-single-part-tag-regexp) + (progn + ;; Make a space between the following message. + (insert "\n") + (forward-char -1) + )) + (if (and (member (cadr ret) '("enriched" "richtext")) + (fboundp 'enriched-mode) + ) + (enriched-mode t) + (if (boundp 'enriched-mode) + (enriched-mode -1) + )) + ))) (defun mime-edit-insert-file (file &optional verbose) "Insert a message from a file."