summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2005-10-22 01:24:38 +0000
committerKenichi Handa <handa@m17n.org>2005-10-22 01:24:38 +0000
commit39925f561fd218411123990428278f2012fe1fde (patch)
treea058cbc0c96992d188db2cbdfc14bdc1857372a5 /lisp/tar-mode.el
parent4fde92efda2fc0ea88128d3a7f1f12bc9517a09f (diff)
downloademacs-39925f561fd218411123990428278f2012fe1fde.tar.gz
(tar-extract): Be sure to call
find-operation-coding-system if set-auto-coding doesn't find a coding system.
Diffstat (limited to 'lisp/tar-mode.el')
-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."
(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 @@ appear on disk when you save the tar-file's buffer."
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)))