diff lisp/jka-compr.el @ 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 852464ce5d6a
children 67642fb78fc4
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))