aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>1998-07-19 15:02:33 +0000
committerEli Zaretskii <[email protected]>1998-07-19 15:02:33 +0000
commite26d162106b39af852923907521a0dc7dc2411ba (patch)
tree4fd709be31ecc7721207a2c1523535c0bf2a224e
parentebe8a0daf5a9e6d37994956d651382e5709f9242 (diff)
(archive-mode): Undo previous change.
(archive-extract): Make the buffer unibyte if the extracted file was read with coding-system of no-conversion or raw-text.
-rw-r--r--lisp/arc-mode.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index ea1f482845..8f3ebd1f43 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -556,8 +556,6 @@ archive.
(make-local-variable 'archive-file-list-start)
(make-local-variable 'archive-file-list-end)
(make-local-variable 'archive-file-name-indent)
- ;; Always edit an archive file in unibyte mode.
- (set-buffer-multibyte nil)
(archive-summarize nil)
(setq buffer-read-only t))))
@@ -890,6 +888,15 @@ using `make-temp-name', and the generated name is returned."
(progn
(set-buffer-modified-p nil)
(kill-buffer buffer))
+ ;; If Emacs were to visit the file we've extracted, it would make
+ ;; the buffer be unibyte if the detected coding-system is
+ ;; no-conversion or raw-text-*. We want the same behavior here
+ ;; as if we were visiting the file, even though some extractors
+ ;; read the file's contents from a pipe.
+ (if (or (eq last-coding-system-used 'no-conversion)
+ ;; type 5 is raw-text
+ (eq (coding-system-type last-coding-system-used) 5))
+ (set-buffer-multibyte nil))
(goto-char (point-min))
(rename-buffer bufname)
(setq buffer-read-only read-only-p)