From 56c3eaceb967b4147425d13542d7dffa20bc7ff0 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 11 Mar 1998 14:43:15 +0000 Subject: [PATCH] (write-region-as-binary): New file. --- emu-20.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/emu-20.el b/emu-20.el index 2a66399..aaae55c 100644 --- a/emu-20.el +++ b/emu-20.el @@ -49,8 +49,8 @@ `(let ((coding-system-for-write 'binary)) ,@body)) -(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, @@ -60,14 +60,21 @@ 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." (let ((coding-system-for-read 'binary) format-alist) (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." + (let ((coding-system-for-read 'binary)) + (write-region start end filename append visit lockname) + )) + + ;;; @@ Mule emulating aliases ;;; ;;; You should not use it. -- 1.7.10.4