/[emacs]/emacs/lisp/tar-mode.el
ViewVC logotype

Diff of /emacs/lisp/tar-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.84 by pj, Wed Feb 20 09:03:38 2002 UTC revision 1.85 by rms, Fri Mar 8 09:54:42 2002 UTC
# Line 373  MODE should be an integer which is a fil Line 373  MODE should be an integer which is a fil
373                  (concat (if (= type 1) " ==> " " --> ") link-name)                  (concat (if (= type 1) " ==> " " --> ") link-name)
374                ""))))                ""))))
375    
376    (defun tar-untar-buffer ()
377      "Extract all archive members in the tar-file."
378      (interactive)
379      (let ((multibyte enable-multibyte-characters))
380        (unwind-protect
381            (save-restriction
382              (widen)
383              (set-buffer-multibyte nil)
384              (dolist (descriptor tar-parse-info)
385                (let* ((tokens (tar-desc-tokens descriptor))
386                       (name (tar-header-name tokens))
387                       (dir (file-name-directory name))
388                       (start (+ (tar-desc-data-start descriptor) tar-header-offset -1))
389                       (end (+ start (tar-header-size tokens))))
390                  (message "Extracting %s" name)
391                  (if (and dir (not (file-exists-p dir)))
392                      (make-directory dir t))
393                  (write-region start end name)
394                  (set-file-modes name (tar-header-mode tokens)))))
395          (set-buffer-multibyte multibyte))))
396    
397  (defun tar-summarize-buffer ()  (defun tar-summarize-buffer ()
398    "Parse the contents of the tar file in the current buffer.    "Parse the contents of the tar file in the current buffer.
399  Place a dired-like listing on the front;  Place a dired-like listing on the front;

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26