summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-05-09 15:37:30 +0000
committerEli Zaretskii <eliz@gnu.org>2001-05-09 15:37:30 +0000
commitc533a7e29a5760a65f1f51069db3981c9014fe52 (patch)
treef1d037b5c664dfce9ac19234d067d037160b4d97 /lisp/tar-mode.el
parentf3d6f4eefcf665b2dfd78ac2beff5a7fcea7c16a (diff)
downloademacs-c533a7e29a5760a65f1f51069db3981c9014fe52.tar.gz
(tar-extract): Pay attention to the value of
coding-system-for-read, if it is non-nil.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r--lisp/tar-mode.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 264bc37f2e6..fac148b2b63 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -716,10 +716,11 @@ appear on disk when you save the tar-file's buffer."
;; We need to mimic the parts of insert-file-contents
;; which determine the coding-system and decode the text.
(let ((coding
- (and set-auto-coding-function
- (save-excursion
- (funcall set-auto-coding-function
- name (- (point-max) (point))))))
+ (or coding-system-for-read
+ (and set-auto-coding-function
+ (save-excursion
+ (funcall set-auto-coding-function
+ name (- (point-max) (point)))))))
(multibyte enable-multibyte-characters)
(detected (detect-coding-region
1 (min 16384 (point-max)) t)))