Mercurial > emacs
comparison lisp/uncompress.el @ 22483:d21d2c3762c1
(uncompress-while-visiting):
Bind coding-system-for-write and coding-system-for-read.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 14 Jun 1998 19:01:06 +0000 |
parents | f741b3e11e37 |
children | b3821a9c2873 |
comparison
equal
deleted
inserted
replaced
22482:eb09852bfc05 | 22483:d21d2c3762c1 |
---|---|
70 (if (and (not (null buffer-file-name)) | 70 (if (and (not (null buffer-file-name)) |
71 (string-match "\\.tgz$" buffer-file-name)) | 71 (string-match "\\.tgz$" buffer-file-name)) |
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") |
79 (set-buffer-modified-p nil) | 84 (set-buffer-modified-p nil) |
80 (make-local-variable 'write-file-hooks) | 85 (make-local-variable 'write-file-hooks) |