changeset 18879:8b226efb9a8b

(jka-compr-insert-file-contents): Bind coding-system-for-read. (jka-compr-write-region): Bind coding-system-for-write. Set buffer-file-type if dos or nt. (jka-compr-call-process): Bind coding-system-for-read and coding-system-for-write.
author Richard M. Stallman <rms@gnu.org>
date Sun, 20 Jul 1997 04:50:25 +0000
parents f39ae9c61a45
children 1ed40ed8e0c1
files lisp/jka-compr.el
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jka-compr.el	Sun Jul 20 04:13:45 1997 +0000
+++ b/lisp/jka-compr.el	Sun Jul 20 04:50:25 1997 +0000
@@ -297,8 +297,10 @@
 (defun jka-compr-call-process (prog message infile output temp args)
   (if jka-compr-use-shell
 
-      (let ((err-file (jka-compr-make-temp-name)))
-	    
+      (let ((err-file (jka-compr-make-temp-name))
+	    (coding-system-for-read 'undecided)
+            (coding-system-for-write 'no-conversion) )
+
 	(unwind-protect
 
 	    (or (memq
@@ -438,11 +440,14 @@
 				    compress-args)
 
 	    (with-current-buffer temp-buffer
-	      (jka-compr-run-real-handler 'write-region
-					  (list (point-min) (point-max)
-						filename
-						(and append can-append) 'dont))
-	      (erase-buffer))
+              (let ((coding-system-for-write 'no-conversion))
+                (if (memq system-type '(ms-dos windows-nt))
+                    (setq buffer-file-type t) )
+                (jka-compr-run-real-handler 'write-region
+                                            (list (point-min) (point-max)
+                                                  filename
+                                                  (and append can-append) 'dont))
+                (erase-buffer)) )
 
 	    (jka-compr-delete-temp-file temp-file)
 
@@ -490,7 +495,8 @@
 	      (local-copy
 	       (jka-compr-run-real-handler 'file-local-copy (list filename)))
 	      local-file
-	      size start)
+	      size start
+              (coding-system-for-read 'undecided) )
 
 	  (setq local-file (or local-copy filename))