[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/tar-mode.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/tar-mode.el |
Date: |
Fri, 08 Mar 2002 04:54:44 -0500 |
Index: emacs/lisp/tar-mode.el
diff -c emacs/lisp/tar-mode.el:1.84 emacs/lisp/tar-mode.el:1.85
*** emacs/lisp/tar-mode.el:1.84 Wed Feb 20 04:03:38 2002
--- emacs/lisp/tar-mode.el Fri Mar 8 04:54:42 2002
***************
*** 373,378 ****
--- 373,399 ----
(concat (if (= type 1) " ==> " " --> ") link-name)
""))))
+ (defun tar-untar-buffer ()
+ "Extract all archive members in the tar-file."
+ (interactive)
+ (let ((multibyte enable-multibyte-characters))
+ (unwind-protect
+ (save-restriction
+ (widen)
+ (set-buffer-multibyte nil)
+ (dolist (descriptor tar-parse-info)
+ (let* ((tokens (tar-desc-tokens descriptor))
+ (name (tar-header-name tokens))
+ (dir (file-name-directory name))
+ (start (+ (tar-desc-data-start descriptor) tar-header-offset
-1))
+ (end (+ start (tar-header-size tokens))))
+ (message "Extracting %s" name)
+ (if (and dir (not (file-exists-p dir)))
+ (make-directory dir t))
+ (write-region start end name)
+ (set-file-modes name (tar-header-mode tokens)))))
+ (set-buffer-multibyte multibyte))))
+
(defun tar-summarize-buffer ()
"Parse the contents of the tar file in the current buffer.
Place a dired-like listing on the front;
- [Emacs-diffs] Changes to emacs/lisp/tar-mode.el,
Richard M. Stallman <=