From e2cf32f990b592e7fffb8bcdd4645373692057fa Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 17 Sep 1998 14:17:47 +0000 Subject: [PATCH] - Move `insert-binary-file-contents' from emu-e20.el, emu-latin1.el, emu-mule.el, emu-nemacs.el and emu-x20.el to emu.el. - Move `insert-binary-file-contents-literally' from emu-latin1.el, emu-mule.el, emu-nemacs.el and emu-x20.el to emu.el. --- emu-e20.el | 3 --- emu-latin1.el | 18 ------------------ emu-mule.el | 18 ------------------ emu-nemacs.el | 18 ------------------ emu-x20.el | 18 ------------------ emu.el | 20 ++++++++++++++++++++ 6 files changed, 20 insertions(+), 75 deletions(-) diff --git a/emu-e20.el b/emu-e20.el index 6c43b07..099dbcb 100644 --- a/emu-e20.el +++ b/emu-e20.el @@ -152,9 +152,6 @@ If CCL-PROG is symbol, it is dereferenced. ;;; @ end ;;; -(defalias 'insert-binary-file-contents 'insert-file-contents-as-binary) -(make-obsolete 'insert-binary-file-contents 'insert-file-contents-as-binary) - (defalias 'insert-binary-file-contents-literally 'insert-file-contents-literally) diff --git a/emu-latin1.el b/emu-latin1.el index f184cfa..a8b7ddc 100644 --- a/emu-latin1.el +++ b/emu-latin1.el @@ -50,24 +50,6 @@ else returns nil. [emu-latin1.el; old MULE emulating function]" t) -;;; @ without code-conversion -;;; - -(defalias 'insert-binary-file-contents 'insert-file-contents-as-binary) -(make-obsolete 'insert-binary-file-contents 'insert-file-contents-as-binary) - -(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, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((emx-binary-mode t)) - ;; Returns list of absolute file name and length of data inserted. - (insert-file-contents-literally filename visit beg end replace))) - - ;;; @ end ;;; diff --git a/emu-mule.el b/emu-mule.el index 2f6f107..5e2d569 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -28,24 +28,6 @@ (require 'poem) -;;; @ binary access -;;; - -(defalias 'insert-binary-file-contents 'insert-file-contents-as-binary) -(make-obsolete 'insert-binary-file-contents 'insert-file-contents-as-binary) - -(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, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (as-binary-input-file - ;; Returns list absolute file name and length of data inserted. - (insert-file-contents-literally filename visit beg end replace))) - - ;;; @ regulation ;;; diff --git a/emu-nemacs.el b/emu-nemacs.el index 087bbfa..b1a622c 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -60,24 +60,6 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" )) -;;; @ without code-conversion -;;; - -(fset 'insert-binary-file-contents 'insert-file-contents-as-binary) - -(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, -find-file-hooks, etc. - This function ensures that none of these modifications will take place. -\[emu-nemacs.el]" - (as-binary-input-file - ;; Returns list absolute file name and length of data inserted. - (insert-file-contents-literally filename visit beg end replace))) - - ;;; @ end ;;; diff --git a/emu-x20.el b/emu-x20.el index 8703ab0..842d6c7 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -42,24 +42,6 @@ 'encode (symbol-value encoder)))) -;;; @ without code-conversion -;;; - -(define-obsolete-function-alias 'insert-binary-file-contents - 'insert-file-contents-as-binary) - -(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, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((coding-system-for-read 'binary)) - ;; Returns list absolute file name and length of data inserted. - (insert-file-contents-literally filename visit beg end replace))) - - ;;; @ character ;;; diff --git a/emu.el b/emu.el index fefc390..287a07e 100644 --- a/emu.el +++ b/emu.el @@ -113,6 +113,26 @@ This constant is defined to emulate old MULE anything older than MULE 2.3. It is obsolete, so don't use it.")) +;;; @ without code-conversion +;;; + +(defalias 'insert-binary-file-contents 'insert-file-contents-as-binary) +(make-obsolete 'insert-binary-file-contents 'insert-file-contents-as-binary) + +(defun-maybe 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, +find-file-hooks, etc. + This function ensures that none of these modifications will take place. +\[emu-nemacs.el]" + (as-binary-input-file + ;; Returns list absolute file name and length of data inserted. + (insert-file-contents-literally filename visit beg end replace))) + + ;;; @ MIME charset ;;; -- 1.7.10.4