From 1630261f038aa79c1024db1fc55d4b318da70790 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 11 Mar 1998 14:56:50 +0000 Subject: [PATCH] (write-region-as-binary): New function. --- emu-mule.el | 19 +++++++++++++++++++ emu-nemacs.el | 14 ++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) 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 ;;; -- 1.7.10.4