diff options
author | Kenichi Handa <handa@m17n.org> | 1997-07-22 03:45:44 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-07-22 03:45:44 +0000 |
commit | baefb0160ea1470731fc83fcb1228835b295dcbb (patch) | |
tree | 81f81defaaaf25a367c0131afb6b5558f240d4a7 /lisp/jka-compr.el | |
parent | 7043c154fc7524ef5f8371b987efe48d0ff519b3 (diff) | |
download | emacs-baefb0160ea1470731fc83fcb1228835b295dcbb.tar.gz |
Fix previous changes.
Diffstat (limited to 'lisp/jka-compr.el')
-rw-r--r-- | lisp/jka-compr.el | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 78f544d4d2c..1bac9a7469d 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -298,7 +298,7 @@ to keep: LEN chars starting BEG chars from the beginning." (if jka-compr-use-shell (let ((err-file (jka-compr-make-temp-name)) - (coding-system-for-read 'undecided) + (coding-system-for-read (or coding-system-for-read 'undecided)) (coding-system-for-write 'no-conversion) ) (unwind-protect @@ -431,13 +431,16 @@ There should be no more than seven characters after the final `/'." (jka-compr-run-real-handler 'write-region (list start end temp-file t 'dont)) - (jka-compr-call-process compress-program - (concat compress-message - " " base-name) - temp-file - temp-buffer - nil - compress-args) + ;; Here we must read the output of compress program as is + ;; without any code conversion. + (let ((coding-system-for-read 'no-conversion)) + (jka-compr-call-process compress-program + (concat compress-message + " " base-name) + temp-file + temp-buffer + nil + compress-args)) (with-current-buffer temp-buffer (let ((coding-system-for-write 'no-conversion)) @@ -496,7 +499,7 @@ There should be no more than seven characters after the final `/'." (jka-compr-run-real-handler 'file-local-copy (list filename))) local-file size start - (coding-system-for-read 'undecided) ) + (coding-system-for-read (or coding-system-for-read 'undecided)) ) (setq local-file (or local-copy filename)) @@ -625,20 +628,28 @@ There should be no more than seven characters after the final `/'." uncompress-message (message "%s %s..." uncompress-message base-name)) - (jka-compr-call-process uncompress-program - (concat uncompress-message - " " base-name) - local-file - t - nil - uncompress-args) - - (and - uncompress-message - (message "%s %s...done" uncompress-message base-name)) - - (write-region - (point-min) (point-max) temp-file nil 'dont)) + ;; Here we must read the output of uncompress program + ;; and write it to TEMP-FILE without any code + ;; conversion. An appropriate code conversion (if + ;; necessary) is done by the later I/O operation + ;; (e.g. load). + (let ((coding-system-for-read 'no-conversion) + (coding-system-for-write 'no-conversion)) + + (jka-compr-call-process uncompress-program + (concat uncompress-message + " " base-name) + local-file + t + nil + uncompress-args) + + (and + uncompress-message + (message "%s %s...done" uncompress-message base-name)) + + (write-region + (point-min) (point-max) temp-file nil 'dont))) (and local-copy |