From: morioka Date: Wed, 11 Mar 1998 14:56:50 +0000 (+0000) Subject: (write-region-as-binary): New function. X-Git-Tag: apel-7_1~33 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1630261f038aa79c1024db1fc55d4b318da70790;p=elisp%2Fapel.git (write-region-as-binary): New function. --- diff --git a/emu-mule.el b/emu-mule.el index 3173d00..a568ece 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -160,6 +160,25 @@ find-file-hooks, etc. (insert-file-contents filename visit beg end replace) )) +(if running-emacs-19_29-or-later + ;; for MULE 2.3 based on Emacs 19.34. + (defun write-region-as-binary (start end filename + &optional append visit lockname) + "Like `write-region', q.v., but don't code conversion." + (let (mc-flag + (file-coding-system *noconv*)) + (write-region start end filename append visit lockname) + )) + ;; for MULE 2.3 based on Emacs 19.28. + (defun write-region-as-binary (start end filename + &optional append visit lockname) + "Like `write-region', q.v., but don't code conversion." + (let (mc-flag + (file-coding-system *noconv*)) + (write-region start end filename append visit) + )) + ) + ;;; @ MIME charset ;;; diff --git a/emu-nemacs.el b/emu-nemacs.el index ece9aa1..21fdc61 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -206,8 +206,8 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" ;;; @ binary access ;;; -(defun insert-binary-file-contents-literally - (filename &optional visit beg end replace) +(defun insert-binary-file-contents-literally (filename + &optional visit beg end replace) "Like `insert-file-contents-literally', q.v., but don't code conversion. A buffer may be modified in several ways after reading into the buffer due to advanced Emacs features, such as file-name-handlers, format decoding, @@ -218,14 +218,20 @@ find-file-hooks, etc. (insert-file-contents-literally filename visit beg end replace) )) -(defun insert-binary-file-contents - (filename &optional visit beg end replace) +(defun insert-binary-file-contents (filename &optional visit beg end replace) "Like `insert-file-contents', q.v., but don't code and format conversion. \[emu-nemacs.el]" (let (kanji-flag) (insert-file-contents filename visit beg end replace) )) +(defun write-region-as-binary (start end filename + &optional append visit lockname) + "Like `write-region', q.v., but don't code conversion. [emu-nemacs.el]" + (let (kanji-flag) + (write-region start end filename append visit) + )) + ;;; @ MIME charset ;;;