aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2005-10-22 01:24:38 +0000
committerKenichi Handa2005-10-22 01:24:38 +0000
commit39925f561fd218411123990428278f2012fe1fde (patch)
treea058cbc0c96992d188db2cbdfc14bdc1857372a5
parent4fde92efda2fc0ea88128d3a7f1f12bc9517a09f (diff)
downloademacs-39925f561fd218411123990428278f2012fe1fde.tar.gz
emacs-39925f561fd218411123990428278f2012fe1fde.zip
(tar-extract): Be sure to call
find-operation-coding-system if set-auto-coding doesn't find a coding system.
-rw-r--r--lisp/tar-mode.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 4362e97af0b..0e57d541dfe 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -735,7 +735,9 @@ appear on disk when you save the tar-file's buffer."
735 (and set-auto-coding-function 735 (and set-auto-coding-function
736 (save-excursion 736 (save-excursion
737 (funcall set-auto-coding-function 737 (funcall set-auto-coding-function
738 name (- (point-max) (point))))))) 738 name (- (point-max) (point)))))
739 (car (find-operation-coding-system
740 'insert-file-contents name t))))
739 (multibyte enable-multibyte-characters) 741 (multibyte enable-multibyte-characters)
740 (detected (detect-coding-region 742 (detected (detect-coding-region
741 (point-min) 743 (point-min)
@@ -747,13 +749,7 @@ appear on disk when you save the tar-file's buffer."
747 coding 749 coding
748 (coding-system-eol-type detected)))) 750 (coding-system-eol-type detected))))
749 (setq coding 751 (setq coding
750 (or (find-new-buffer-file-coding-system detected) 752 (find-new-buffer-file-coding-system detected)))
751 (let ((file-coding
752 (find-operation-coding-system
753 'insert-file-contents buffer-file-name)))
754 (if (consp file-coding)
755 (setq file-coding (car file-coding))
756 file-coding)))))
757 (if (or (eq coding 'no-conversion) 753 (if (or (eq coding 'no-conversion)
758 (eq (coding-system-type coding) 5)) 754 (eq (coding-system-type coding) 5))
759 (setq multibyte (set-buffer-multibyte nil))) 755 (setq multibyte (set-buffer-multibyte nil)))