# HG changeset patch # User Eli Zaretskii # Date 900860553 0 # Node ID 346c8633f09462f6fbf412c2a399117e426acc81 # Parent d7ebc53b6b161ca099b3327d15bbba1c93a96559 (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. diff -r d7ebc53b6b16 -r 346c8633f094 lisp/arc-mode.el --- a/lisp/arc-mode.el Sun Jul 19 05:17:35 1998 +0000 +++ b/lisp/arc-mode.el Sun Jul 19 15:02:33 1998 +0000 @@ -556,8 +556,6 @@ (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 @@ (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)