From: morioka Date: Thu, 14 May 1998 06:56:43 +0000 (+0000) Subject: (write-region-as-mime-charset): New function. X-Git-Tag: apel-8_12~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a2baa53f54bbeef31096356e76e361ed796f59ef;p=elisp%2Fapel.git (write-region-as-mime-charset): New function. --- diff --git a/emu-mule.el b/emu-mule.el index 63be74e..b089a14 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -220,6 +220,14 @@ find-file-hooks, etc. (decode-coding-string string cs) string))) +(defun write-region-as-mime-charset (charset start end filename) + "Like `write-region', q.v., but code-convert by MIME CHARSET." + (let ((file-coding-system + (or (mime-charset-to-coding-system charset) + *noconv*))) + (write-region start end filename append visit) + )) + ;;; @@ to coding-system ;;;