;; Each member header points to the next. The archive is
;; terminated by a bogus header with a zero next link.
;; -------------------------------------
-;; HOOKS: `foo' means one the the supported archive types.
+;; HOOKS: `foo' means one of the supported archive types.
;;
;; archive-mode-hook
;; archive-foo-mode-hook
:group 'archive)
(defcustom archive-tmpdir
+ ;; make-temp-name is safe here because we use this name
+ ;; to create a directory.
(make-temp-name
(expand-file-name (if (eq system-type 'ms-dos) "ar" "archive.tmp")
temporary-file-directory))
(defun archive-dostime (time)
"Stringify dos packed TIME record."
(let ((hour (logand (ash time -11) 31))
- (minute (logand (ash time -5) 53))
+ (minute (logand (ash time -5) 63))
(second (* 2 (logand time 31)))) ; 2 seconds resolution
(format "%02d:%02d:%02d" hour minute second)))
(string-match "\\.[aA][rR][cC]$"
(or buffer-file-name (buffer-name))))
'arc)
- (t (error "Buffer format not recognized.")))))
+ (t (error "Buffer format not recognized")))))
;; -------------------------------------------------------------------------
(defun archive-summarize (&optional shut-up)
"Parse the contents of the archive file in the current buffer.
(let ((text (concat (aref fil 0) "\n")))
(if archive-lemacs
() ; out of luck
- (put-text-property (aref fil 1) (aref fil 2)
- 'mouse-face 'highlight
- text))
+ (add-text-properties
+ (aref fil 1) (aref fil 2)
+ '(mouse-face highlight
+ help-echo "mouse-2: extract this file into a buffer")
+ text))
text)))
files)))
(setq archive-file-list-end (point-marker)))
(provide 'arc-mode)
-;; arc-mode.el ends here.
+;;; arc-mode.el ends here