aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-14 19:01:06 +0000
committerRichard M. Stallman1998-06-14 19:01:06 +0000
commit7a784f27db9875b8efcb7e71d87769281463f2a0 (patch)
tree42b742fe9f9fd83b7eef22be65f16ff94dc625fa
parentdd81ca0dd846b284e7fea5351089d896e0c8d57c (diff)
downloademacs-7a784f27db9875b8efcb7e71d87769281463f2a0.tar.gz
emacs-7a784f27db9875b8efcb7e71d87769281463f2a0.zip
(uncompress-while-visiting):
Bind coding-system-for-write and coding-system-for-read.
-rw-r--r--lisp/uncompress.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/uncompress.el b/lisp/uncompress.el
index ceaa0dac1ba..c731c23baf6 100644
--- a/lisp/uncompress.el
+++ b/lisp/uncompress.el
@@ -72,7 +72,12 @@ It then selects a major mode from the uncompressed file name and contents."
72 (set-visited-file-name 72 (set-visited-file-name
73 (concat (substring buffer-file-name 0 (match-beginning 0)) ".tar"))))) 73 (concat (substring buffer-file-name 0 (match-beginning 0)) ".tar")))))
74 (message "Uncompressing...") 74 (message "Uncompressing...")
75 (let ((buffer-read-only nil)) 75 (let ((buffer-read-only nil)
76 (coding-system-for-write 'no-conversion)
77 (coding-system-for-read
78 (find-operation-coding-system
79 'insert-file-contents
80 buffer-file-name t)))
76 (shell-command-on-region (point-min) (point-max) uncompress-program t)) 81 (shell-command-on-region (point-min) (point-max) uncompress-program t))
77 (goto-char (point-min)) 82 (goto-char (point-min))
78 (message "Uncompressing...done") 83 (message "Uncompressing...done")