(tar-extract): Pay attention to the value of
authorEli Zaretskii <eliz@gnu.org>
Wed, 9 May 2001 15:37:30 +0000 (15:37 +0000)
committerEli Zaretskii <eliz@gnu.org>
Wed, 9 May 2001 15:37:30 +0000 (15:37 +0000)
coding-system-for-read, if it is non-nil.

lisp/ChangeLog
lisp/tar-mode.el

index 6d55e8c..21dd7b5 100644 (file)
@@ -1,5 +1,8 @@
 2001-05-09  Eli Zaretskii  <eliz@is.elta.co.il>
 
+       * tar-mode.el (tar-extract): Pay attention to the value of
+       coding-system-for-read, if it is non-nil.
+
        * calendar/holidays.el (holidays): Add an autoload cookie.  From
        Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>.
 
index 264bc37..fac148b 100644 (file)
@@ -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)))