comparison lisp/tar-mode.el @ 14294:f8eba77ccb7f

(tar-summarize-buffer): Fix "done" message. (tar-summarize-buffer): Insert summary lines in same order as tar-parse-info.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 Jan 1996 23:31:12 +0000
parents b986e1fb97a5
children acf049402d18
comparison
equal deleted inserted replaced
14293:87b4bd8fea26 14294:f8eba77ccb7f
455 (make-local-variable 'tar-parse-info) 455 (make-local-variable 'tar-parse-info)
456 (setq tar-parse-info (nreverse result)) 456 (setq tar-parse-info (nreverse result))
457 ;; A tar file should end with a block or two of nulls, 457 ;; A tar file should end with a block or two of nulls,
458 ;; but let's not get a fatal error if it doesn't. 458 ;; but let's not get a fatal error if it doesn't.
459 (if (eq tokens 'empty-tar-block) 459 (if (eq tokens 'empty-tar-block)
460 (message "Parsing tar file...done.") 460 (message "Parsing tar file...done")
461 (message "Warning: premature EOF parsing tar file"))) 461 (message "Warning: premature EOF parsing tar file")))
462 (save-excursion 462 (save-excursion
463 (goto-char (point-min)) 463 (goto-char (point-min))
464 (let ((buffer-read-only nil) 464 (let ((buffer-read-only nil)
465 (summaries nil)) 465 (summaries nil))
466 ;; Collect summary lines and insert them all at once since tar files 466 ;; Collect summary lines and insert them all at once since tar files
467 ;; can be pretty big. 467 ;; can be pretty big.
468 (tar-dolist (tar-desc tar-parse-info) 468 (tar-dolist (tar-desc (reverse tar-parse-info))
469 (setq summaries 469 (setq summaries
470 (cons (tar-header-block-summarize (tar-desc-tokens tar-desc)) 470 (cons (tar-header-block-summarize (tar-desc-tokens tar-desc))
471 (cons "\n" 471 (cons "\n"
472 summaries)))) 472 summaries))))
473 (insert (apply 'concat summaries)) 473 (insert (apply 'concat summaries))