create a buffer for extracted file, in case there's more than one
file by that name in an archive, possibly in different
directories. From Kevin Rodgers <kevinr@ihs.com>.
0. Give correct argument to set-auto-coding-function.
(tar-expunge): For goto-char, use (point-min), not 0.
(tar-clear-modification-flags): For goto-char, use (point-min), not 1.
(tar-subfile-save-buffer): Likewize.
(tar-clip-time-string): Prepend a space.
(tar-grind-file-mode): Construct a string rather than modifying one.
(tar-header-block-summarize): Fix docstring.
Use `format' rather than an error-prone set of copy-loops.
and link names if necessary.
(tar-header-block-summarize): Handle the case that file or link
names are multibyte.
(tar-summarize-buffer): At first set the current buffer unibyte,
then if there are multibyte file names, change it to multibyte.
(tar-mode): Get char position from tar-header-offset.
(tar-extract): Avoid multibyte<->unibyte conversion in
insert-buffer-subsring by setting both buffers unibyte
temporarily.
(tar-copy): Set the buffer unibyte while doing a work. Write
without code conversion.
(tar-expunge): Set the buffer unibyte while doing a work.
(tar-alter-one-field): Likewise.
(tar-clear-modification-flags): Compare byte position with
tar-header-offset.
(tar-subfile-save-buffer): Avoid multibyte<->unibyte conversion in
insert-buffer-subsring by setting both buffers unibyte
temporarily. Pay attention to multibyteness while updating the
descriptor-line.
(tar-mode-write-file): Write without code conversion.
(tar-extract): Detect coding-system of the archive member and
decode it like insert-file-contents does.
(tar-alter-one-field): Reposition point on the file name of the
current tar entry.
(tar-subfile-save-buffer): Encode the file when updating it in the
archive, and use the size of encoded text to update the header
block. Set last-coding-system-used to coding-system of the file.
Restore point of tar-superior-buffer after updating the descriptor line.
(tar-subfile-mode): Doc fix.
(tar-expunge): Make questions and messages start with upper case letter.
(tar-summarize-buffer): Ditto.
(tar-subfile-save-buffer): Make message like others.
(tar-mode): Locally bind local-write-file-hooks.
(tar-mode-write-file): Renamed from tar-mode-maybe-write-tar-file.
(tar-mode-write-file): Simplify to only work for tar file buffers.
(write-file-hooks): Don't modify this.