# HG changeset patch # User Kenichi Handa # Date 1043202835 0 # Node ID e5099d153f9456f9553c3ef467de3c2f66d77c2d # Parent ed922baa8df3a5f8ec9a1589160239baa6cb1861 (jka-compr-insert-file-contents): Read a process output without decoding. Decode the result by decode-coding-region-as-inserted-from-file. diff -r ed922baa8df3 -r e5099d153f94 lisp/jka-compr.el --- a/lisp/jka-compr.el Wed Jan 22 02:33:07 2003 +0000 +++ b/lisp/jka-compr.el Wed Jan 22 02:33:55 2003 +0000 @@ -527,20 +527,7 @@ (local-copy (jka-compr-run-real-handler 'file-local-copy (list filename))) local-file - size start - (coding-system-for-read - (or coding-system-for-read - ;; If multibyte characters are disabled, - ;; don't do that conversion. - (and (null enable-multibyte-characters) - (or (auto-coding-alist-lookup - (jka-compr-byte-compiler-base-file-name file)) - 'raw-text)) - (let ((coding (find-operation-coding-system - 'insert-file-contents - (jka-compr-byte-compiler-base-file-name file)))) - (and (consp coding) (car coding))) - 'undecided)) ) + size start) (setq local-file (or local-copy filename)) @@ -558,7 +545,7 @@ (condition-case error-code - (progn + (let ((coding-system-for-read 'no-conversion)) (if replace (goto-char (point-min))) (setq start (point)) @@ -606,6 +593,11 @@ (file-exists-p local-copy) (delete-file local-copy))) + (decode-region-as-inserted-from-file + (point) (+ (point) size) + (jka-compr-byte-compiler-base-file-name file) + visit beg end replace) + (and visit (progn