(write-region-as-binary): bind `jka-compr-compression-info-list' with
authormorioka <morioka>
Sat, 10 Oct 1998 01:40:32 +0000 (01:40 +0000)
committermorioka <morioka>
Sat, 10 Oct 1998 01:40:32 +0000 (01:40 +0000)
nil.
(insert-file-contents-as-binary): Change to alias of
`insert-file-contents-literally' for Emacs 20.

poem-20.el

index 33acef7..6e4158a 100644 (file)
 (defun write-region-as-binary (start end filename
                                     &optional append visit lockname)
   "Like `write-region', q.v., but don't encode."
-  (let ((coding-system-for-write 'binary))
+  (let ((coding-system-for-write 'binary)
+       jka-compr-compression-info-list)
     (write-region start end filename append visit lockname)))
 
-(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)
-    ;; Returns list of absolute file name and length of data inserted.
-    (insert-file-contents filename visit beg end replace)))
+;; `insert-file-contents-literally' of Emacs 20 supports
+;; `file-name-handler-alist'.
+(defalias 'insert-file-contents-as-binary 'insert-file-contents-literally)
 
 (defun insert-file-contents-as-raw-text (filename
                                         &optional visit beg end replace)