Function: archive-rar-exe-extract
archive-rar-exe-extract is a byte-compiled function defined in
arc-mode.el.gz.
Signature
(archive-rar-exe-extract ARCHIVE NAME)
Source Code
;; Defined in /usr/src/emacs/lisp/arc-mode.el.gz
(defun archive-rar-exe-extract (archive name)
(let* ((tmpfile (make-temp-file "rarexe"))
(buf (find-buffer-visiting archive))
(tmpbuf (unless buf (generate-new-buffer " *rar-exe*"))))
(unwind-protect
(progn
(with-current-buffer (or buf tmpbuf)
(save-excursion
(save-restriction
(if buf
;; point-max unwidened is assumed to be the end of the
;; summary text and the beginning of the actual file data.
(progn (goto-char (point-max)) (widen))
(insert-file-contents-literally archive)
(goto-char (point-min)))
(re-search-forward "Rar!")
(write-region (match-beginning 0) (point-max) tmpfile))))
(archive-rar-extract tmpfile name))
(if tmpbuf (kill-buffer tmpbuf))
(delete-file tmpfile))))