# HG changeset patch # User Gerd Moellmann # Date 997191323 0 # Node ID 03376ff9ccfdb5fe8c14483b88665e76141c1dab # Parent 413ba1a72a247d98a1592f8b867e524b82cfb661 (tar-extract): Avoid generating a new buffer for each file visited. From Markus Rost . diff -r 413ba1a72a24 -r 03376ff9ccfd lisp/tar-mode.el --- a/lisp/tar-mode.el Tue Aug 07 11:37:10 2001 +0000 +++ b/lisp/tar-mode.el Tue Aug 07 13:35:23 2001 +0000 @@ -682,21 +682,17 @@ (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)