diff options
| author | Richard M. Stallman | 1997-07-20 04:50:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-20 04:50:25 +0000 |
| commit | a81635fcb8d7080683f9a1fd0fea5b081f55a1fa (patch) | |
| tree | 8537a82cb94f975794fdabd32964bc108a23ea48 | |
| parent | 5d9719e6eeaf5ea4d16c19f947148b0e78f81531 (diff) | |
| download | emacs-a81635fcb8d7080683f9a1fd0fea5b081f55a1fa.tar.gz emacs-a81635fcb8d7080683f9a1fd0fea5b081f55a1fa.zip | |
(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.
| -rw-r--r-- | lisp/jka-compr.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 887247710d7..78f544d4d2c 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el | |||
| @@ -297,8 +297,10 @@ to keep: LEN chars starting BEG chars from the beginning." | |||
| 297 | (defun jka-compr-call-process (prog message infile output temp args) | 297 | (defun jka-compr-call-process (prog message infile output temp args) |
| 298 | (if jka-compr-use-shell | 298 | (if jka-compr-use-shell |
| 299 | 299 | ||
| 300 | (let ((err-file (jka-compr-make-temp-name))) | 300 | (let ((err-file (jka-compr-make-temp-name)) |
| 301 | 301 | (coding-system-for-read 'undecided) | |
| 302 | (coding-system-for-write 'no-conversion) ) | ||
| 303 | |||
| 302 | (unwind-protect | 304 | (unwind-protect |
| 303 | 305 | ||
| 304 | (or (memq | 306 | (or (memq |
| @@ -438,11 +440,14 @@ There should be no more than seven characters after the final `/'." | |||
| 438 | compress-args) | 440 | compress-args) |
| 439 | 441 | ||
| 440 | (with-current-buffer temp-buffer | 442 | (with-current-buffer temp-buffer |
| 441 | (jka-compr-run-real-handler 'write-region | 443 | (let ((coding-system-for-write 'no-conversion)) |
| 442 | (list (point-min) (point-max) | 444 | (if (memq system-type '(ms-dos windows-nt)) |
| 443 | filename | 445 | (setq buffer-file-type t) ) |
| 444 | (and append can-append) 'dont)) | 446 | (jka-compr-run-real-handler 'write-region |
| 445 | (erase-buffer)) | 447 | (list (point-min) (point-max) |
| 448 | filename | ||
| 449 | (and append can-append) 'dont)) | ||
| 450 | (erase-buffer)) ) | ||
| 446 | 451 | ||
| 447 | (jka-compr-delete-temp-file temp-file) | 452 | (jka-compr-delete-temp-file temp-file) |
| 448 | 453 | ||
| @@ -490,7 +495,8 @@ There should be no more than seven characters after the final `/'." | |||
| 490 | (local-copy | 495 | (local-copy |
| 491 | (jka-compr-run-real-handler 'file-local-copy (list filename))) | 496 | (jka-compr-run-real-handler 'file-local-copy (list filename))) |
| 492 | local-file | 497 | local-file |
| 493 | size start) | 498 | size start |
| 499 | (coding-system-for-read 'undecided) ) | ||
| 494 | 500 | ||
| 495 | (setq local-file (or local-copy filename)) | 501 | (setq local-file (or local-copy filename)) |
| 496 | 502 | ||