aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2003-01-22 02:33:55 +0000
committerKenichi Handa2003-01-22 02:33:55 +0000
commitf54a7168053eef3fe34697272ee4241f9887269a (patch)
tree69a31cceb97d4df0be260149097091e7cb5e7425
parentf29387e80b31f675b8e54516ab94b1eca157b730 (diff)
downloademacs-f54a7168053eef3fe34697272ee4241f9887269a.tar.gz
emacs-f54a7168053eef3fe34697272ee4241f9887269a.zip
(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 `/'."
527 (local-copy 527 (local-copy
528 (jka-compr-run-real-handler 'file-local-copy (list filename))) 528 (jka-compr-run-real-handler 'file-local-copy (list filename)))
529 local-file 529 local-file
530 size start 530 size start)
531 (coding-system-for-read
532 (or coding-system-for-read
533 ;; If multibyte characters are disabled,
534 ;; don't do that conversion.
535 (and (null enable-multibyte-characters)
536 (or (auto-coding-alist-lookup
537 (jka-compr-byte-compiler-base-file-name file))
538 'raw-text))
539 (let ((coding (find-operation-coding-system
540 'insert-file-contents
541 (jka-compr-byte-compiler-base-file-name file))))
542 (and (consp coding) (car coding)))
543 'undecided)) )
544 531
545 (setq local-file (or local-copy filename)) 532 (setq local-file (or local-copy filename))
546 533
@@ -558,7 +545,7 @@ There should be no more than seven characters after the final `/'."
558 545
559 (condition-case error-code 546 (condition-case error-code
560 547
561 (progn 548 (let ((coding-system-for-read 'no-conversion))
562 (if replace 549 (if replace
563 (goto-char (point-min))) 550 (goto-char (point-min)))
564 (setq start (point)) 551 (setq start (point))
@@ -606,6 +593,11 @@ There should be no more than seven characters after the final `/'."
606 (file-exists-p local-copy) 593 (file-exists-p local-copy)
607 (delete-file local-copy))) 594 (delete-file local-copy)))
608 595
596 (decode-region-as-inserted-from-file
597 (point) (+ (point) size)
598 (jka-compr-byte-compiler-base-file-name file)
599 visit beg end replace)
600
609 (and 601 (and
610 visit 602 visit
611 (progn 603 (progn