Commit e8421604 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(tar-extract): Avoid generating a new buffer

for each file visited.  From Markus Rost <rost@math.ohio-state.edu>.
parent 17fdcfc8
2001-08-07 Gerd Moellmann <gerd@gnu.org>
 
* tar-mode.el (tar-extract): Avoid generating a new buffer
for each file visited. From Markus Rost <rost@math.ohio-state.edu>.
* textmodes/paragraphs.el (forward-sentence): Avoid building
a regexp from sentence-end. From Kenichi Handa <handa@etl.go.jp>.
 
......@@ -8,7 +11,7 @@
inserting it.
 
* image.el (image-type-regexps): For JPEG files, use a regexp
derived from the JPEG spec.
derived from the JFIF spec.
* image.el (image-type-regexps): Use `\`' instead of `^' in
most regular expressions.
......
......@@ -682,21 +682,17 @@ appear on disk when you save the tar-file's buffer."
(let* ((tar-buffer (current-buffer))
(tar-buffer-multibyte enable-multibyte-characters)
(tarname (buffer-name))
(bufname (generate-new-buffer-name
(concat (file-name-nondirectory name)
(bufname (concat (file-name-nondirectory name)
" ("
tarname
")")))
")"))
(read-only-p (or buffer-read-only view-p))
(buffer (get-buffer bufname))
(just-created nil)
(new-buffer-file-name (expand-file-name
;; `:' is not allowed on Windows
(concat tarname "!" name))))
(if (and buffer
;; Check that the buffer is visiting the same file
(equal (buffer-file-name buffer) new-buffer-file-name))
nil
(concat tarname "!" name)))
(buffer (get-file-buffer new-buffer-file-name))
(just-created nil))
(unless buffer
(setq buffer (generate-new-buffer bufname))
(setq bufname (buffer-name buffer))
(setq just-created t)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment