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> 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 * textmodes/paragraphs.el (forward-sentence): Avoid building
a regexp from sentence-end. From Kenichi Handa <handa@etl.go.jp>. a regexp from sentence-end. From Kenichi Handa <handa@etl.go.jp>.
   
...@@ -8,7 +11,7 @@ ...@@ -8,7 +11,7 @@
inserting it. inserting it.
   
* image.el (image-type-regexps): For JPEG files, use a regexp * 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 * image.el (image-type-regexps): Use `\`' instead of `^' in
most regular expressions. most regular expressions.
......
...@@ -682,21 +682,17 @@ appear on disk when you save the tar-file's buffer." ...@@ -682,21 +682,17 @@ appear on disk when you save the tar-file's buffer."
(let* ((tar-buffer (current-buffer)) (let* ((tar-buffer (current-buffer))
(tar-buffer-multibyte enable-multibyte-characters) (tar-buffer-multibyte enable-multibyte-characters)
(tarname (buffer-name)) (tarname (buffer-name))
(bufname (generate-new-buffer-name (bufname (concat (file-name-nondirectory name)
(concat (file-name-nondirectory name) " ("
" ("
tarname tarname
")"))) ")"))
(read-only-p (or buffer-read-only view-p)) (read-only-p (or buffer-read-only view-p))
(buffer (get-buffer bufname))
(just-created nil)
(new-buffer-file-name (expand-file-name (new-buffer-file-name (expand-file-name
;; `:' is not allowed on Windows ;; `:' is not allowed on Windows
(concat tarname "!" name)))) (concat tarname "!" name)))
(if (and buffer (buffer (get-file-buffer new-buffer-file-name))
;; Check that the buffer is visiting the same file (just-created nil))
(equal (buffer-file-name buffer) new-buffer-file-name)) (unless buffer
nil
(setq buffer (generate-new-buffer bufname)) (setq buffer (generate-new-buffer bufname))
(setq bufname (buffer-name buffer)) (setq bufname (buffer-name buffer))
(setq just-created t) (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