changeset 66297:2820d2d9eea5

(tar-extract): Be sure to call find-operation-coding-system if set-auto-coding doesn't find a coding system.
author Kenichi Handa <handa@m17n.org>
date Sat, 22 Oct 2005 01:24:38 +0000
parents 941b6508462f
children f8a064f9444b
files lisp/tar-mode.el
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tar-mode.el	Fri Oct 21 23:42:21 2005 +0000
+++ b/lisp/tar-mode.el	Sat Oct 22 01:24:38 2005 +0000
@@ -735,7 +735,9 @@
 			     (and set-auto-coding-function
 				  (save-excursion
 				    (funcall set-auto-coding-function
-					     name (- (point-max) (point)))))))
+					     name (- (point-max) (point)))))
+			     (car (find-operation-coding-system
+				   'insert-file-contents name t))))
 			(multibyte enable-multibyte-characters)
 			(detected (detect-coding-region
 				   (point-min)
@@ -747,13 +749,7 @@
 					  coding
 					  (coding-system-eol-type detected))))
 		      (setq coding
-			    (or (find-new-buffer-file-coding-system detected)
-				(let ((file-coding
-				       (find-operation-coding-system
-					'insert-file-contents buffer-file-name)))
-				  (if (consp file-coding)
-				      (setq file-coding (car file-coding))
-				    file-coding)))))
+			    (find-new-buffer-file-coding-system detected)))
 		    (if (or (eq coding 'no-conversion)
 			    (eq (coding-system-type coding) 5))
 			(setq multibyte (set-buffer-multibyte nil)))