diff options
author | Eli Zaretskii <eliz@gnu.org> | 2004-10-08 17:31:51 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2004-10-08 17:31:51 +0000 |
commit | d0e2accefacb2323db4cf893c425356e8915d4f0 (patch) | |
tree | cff20843441428a85fc280294fe5ab07667272d2 /lisp/tar-mode.el | |
parent | b4329caaf870b78b09bfbbc0b5e79f3b3296b230 (diff) | |
download | emacs-d0e2accefacb2323db4cf893c425356e8915d4f0.tar.gz |
(tar-summarize-buffer): Use progress reporter.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r-- | lisp/tar-mode.el | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 0f0c22cabe1..62686d026c1 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -404,11 +404,11 @@ Place a dired-like listing on the front; then narrow to it, so that only that listing is visible (and the real data of the buffer is hidden)." (set-buffer-multibyte nil) - (message "Parsing tar file...") (let* ((result '()) (pos (point-min)) - (bs (max 1 (- (buffer-size) 1024))) ; always 2+ empty blocks at end. - (bs100 (max 1 (/ bs 100))) + (progress-reporter + (make-progress-reporter "Parsing tar file..." + (point-min) (max 1 (- (buffer-size) 1024)))) tokens) (while (and (<= (+ pos 512) (point-max)) (not (eq 'empty-tar-block @@ -416,10 +416,7 @@ is visible (and the real data of the buffer is hidden)." (tar-header-block-tokenize (buffer-substring pos (+ pos 512))))))) (setq pos (+ pos 512)) - (message "Parsing tar file...%d%%" - ;(/ (* pos 100) bs) ; this gets round-off lossage - (/ pos bs100) ; this doesn't - ) + (progress-reporter-update progress-reporter pos) (if (eq (tar-header-link-type tokens) 20) ;; Foo. There's an extra empty block after these. (setq pos (+ pos 512))) @@ -446,7 +443,7 @@ is visible (and the real data of the buffer is hidden)." ;; A tar file should end with a block or two of nulls, ;; but let's not get a fatal error if it doesn't. (if (eq tokens 'empty-tar-block) - (message "Parsing tar file...done") + (progress-reporter-done progress-reporter) (message "Warning: premature EOF parsing tar file"))) (save-excursion (goto-char (point-min)) |