summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-01-22 02:33:55 +0000
committerKenichi Handa <handa@m17n.org>2003-01-22 02:33:55 +0000
commitf54a7168053eef3fe34697272ee4241f9887269a (patch)
tree69a31cceb97d4df0be260149097091e7cb5e7425
parentf29387e80b31f675b8e54516ab94b1eca157b730 (diff)
downloademacs-f54a7168053eef3fe34697272ee4241f9887269a.tar.gz
(jka-compr-insert-file-contents): Read a process
output without decoding. Decode the result by decode-coding-region-as-inserted-from-file.
-rw-r--r--lisp/jka-compr.el22
1 files changed, 7 insertions, 15 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 8e347c3b1f6..9f6baaf3cb7 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -527,20 +527,7 @@ 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
- (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 @@ There should be no more than seven characters after the final `/'."
(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 @@ There should be no more than seven characters after the final `/'."
(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