;;; @ binary access
;;;
+(defun insert-file-contents-as-binary (filename
+ &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but don't code and format conversion.
+Like `insert-file-contents-literary', but it allows find-file-hooks,
+automatic uncompression, etc.
+
+Namely this function ensures that only format decoding and character
+code conversion will not take place."
+ (let ((emx-binary-mode t))
+ (insert-file-contents filename visit beg end replace)
+ ))
+
+(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.
(insert-file-contents-literally filename 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 ((emx-binary-mode t))
- (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."
;;; @ binary access
;;;
-(defun insert-binary-file-contents (filename &optional visit beg end replace)
- "Like `insert-file-contents', q.v., but don't code and format conversion."
+(defun insert-file-contents-as-binary (filename
+ &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but don't code and format conversion.
+Like `insert-file-contents-literary', but it allows find-file-hooks,
+automatic uncompression, etc.
+
+Namely this function ensures that only format decoding and character
+code conversion will not take place."
(let ((flag enable-multibyte-characters)
(coding-system-for-read 'binary)
format-alist)
(setq enable-multibyte-characters flag)
))
+(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)
;;; @ binary access
;;;
-(defun insert-binary-file-contents-literally
- (filename &optional visit beg end replace)
+(defun insert-file-contents-as-binary (filename
+ &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but don't code and format conversion.
+Like `insert-file-contents-literary', but it allows find-file-hooks,
+automatic uncompression, etc.
+
+Namely this function ensures that only format decoding and character
+code conversion will not take place."
+ (let (mc-flag
+ (file-coding-system *noconv*))
+ (insert-file-contents filename visit beg end replace)
+ ))
+
+(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,
(insert-file-contents-literally filename 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 (mc-flag
- (file-coding-system *noconv*))
- (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
;;; @ binary access
;;;
+(defun insert-file-contents-as-binary (filename
+ &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but don't character code conversion.
+\[emu-nemacs.el]"
+ (let (kanji-flag)
+ (insert-file-contents filename visit beg end replace)
+ ))
+
+(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.
(insert-file-contents-literally filename 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]"
;;; @ binary access
;;;
-(defun insert-binary-file-contents (filename &optional visit beg end replace)
- "Like `insert-file-contents', q.v., but don't code and format conversion."
+(defun insert-file-contents-as-binary (filename
+ &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but don't code and format conversion.
+Like `insert-file-contents-literary', but it allows find-file-hooks,
+automatic uncompression, etc.
+
+Namely this function ensures that only format decoding and character
+code conversion will not take place."
(let ((coding-system-for-read 'binary)
format-alist)
(insert-file-contents filename visit beg end replace)
))
+(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.