Mercurial > emacs
comparison lisp/jka-compr.el @ 49377:e5099d153f94
(jka-compr-insert-file-contents): Read a process
output without decoding. Decode the result by
decode-coding-region-as-inserted-from-file.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 22 Jan 2003 02:33:55 +0000 |
parents | 1161904f7cbb |
children | 08f632f2bdae |
comparison
equal
deleted
inserted
replaced
49376:ed922baa8df3 | 49377:e5099d153f94 |
---|---|
525 (base-name (file-name-nondirectory filename)) | 525 (base-name (file-name-nondirectory filename)) |
526 (notfound nil) | 526 (notfound nil) |
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 |
547 (and | 534 (and |
548 visit | 535 visit |
556 uncompress-message | 543 uncompress-message |
557 (message "%s %s..." uncompress-message base-name)) | 544 (message "%s %s..." uncompress-message base-name)) |
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)) |
565 (if (or beg end) | 552 (if (or beg end) |
566 (jka-compr-partial-uncompress uncompress-program | 553 (jka-compr-partial-uncompress uncompress-program |
604 (and | 591 (and |
605 local-copy | 592 local-copy |
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 |
612 (unlock-buffer) | 604 (unlock-buffer) |
613 (setq buffer-file-name filename) | 605 (setq buffer-file-name filename) |