Commit a81635fc authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 5d9719e6
......@@ -297,8 +297,10 @@ to keep: LEN chars starting BEG chars from the beginning."
(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 @@ There should be no more than seven characters after the final `/'."
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 @@ There should be no more than seven characters after the final `/'."
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment