:group 'archive-zip)
(defcustom archive-zip-update
- (if archive-zip-use-pkzip '("pkzip" "-u") '("zip" "-q"))
+ (if archive-zip-use-pkzip '("pkzip" "-u" "-P") '("zip" "-q"))
"*Program and its options to run in order to update a zip file member.
Options should ensure that specified directory will be put into the zip
file. Archive and member name will be added."
(make-local-variable 'local-enable-local-variables)
(setq local-enable-local-variables nil)
+ ;; Prevent loss of data when saving the file.
+ (make-local-variable 'file-precious-flag)
+ (setq file-precious-flag t)
+
(make-local-variable 'archive-read-only)
;; Archives which are inside other archives and whose
;; names are invalid for this OS, can't be written.
(define-key archive-mode-map [down] 'archive-next-line)
(define-key archive-mode-map "o" 'archive-extract-other-window)
(define-key archive-mode-map "p" 'archive-previous-line)
+ (define-key archive-mode-map "q" 'quit-window)
(define-key archive-mode-map "\C-p" 'archive-previous-line)
(define-key archive-mode-map [up] 'archive-previous-line)
(define-key archive-mode-map "r" 'archive-rename-entry)
(if archive-lemacs
() ; out of luck
- ;; Get rid of the Edit menu bar item to save space.
- (define-key archive-mode-map [menu-bar edit] 'undefined)
(define-key archive-mode-map [menu-bar immediate]
(cons "Immediate" (make-sparse-keymap "Immediate")))
(define-key archive-mode-map [menu-bar immediate alternate]
- '("Alternate Display" . archive-alternate-display))
- (put 'archive-alternate-display 'menu-enable
- '(boundp (archive-name "alternate-display")))
+ '(menu-item "Alternate Display" archive-alternate-display
+ :enable (boundp (archive-name "alternate-display"))
+ :help "Toggle alternate file info display"))
(define-key archive-mode-map [menu-bar immediate view]
- '("View This File" . archive-view))
+ '(menu-item "View This File" archive-view
+ :help "Display file at cursor in View Mode"))
(define-key archive-mode-map [menu-bar immediate display]
- '("Display in Other Window" . archive-display-other-window))
+ '(menu-item "Display in Other Window" archive-display-other-window
+ :help "Display file at cursor in another window"))
(define-key archive-mode-map [menu-bar immediate find-file-other-window]
- '("Find in Other Window" . archive-extract-other-window))
+ '(menu-item "Find in Other Window" archive-extract-other-window
+ :help "Edit file at cursor in another window"))
(define-key archive-mode-map [menu-bar immediate find-file]
- '("Find This File" . archive-extract))
+ '(menu-item "Find This File" archive-extract
+ :help "Extract file at cursor and edit it"))
(define-key archive-mode-map [menu-bar mark]
(cons "Mark" (make-sparse-keymap "Mark")))
(define-key archive-mode-map [menu-bar mark unmark-all]
- '("Unmark All" . archive-unmark-all-files))
+ '(menu-item "Unmark All" archive-unmark-all-files
+ :help "Unmark all marked files"))
(define-key archive-mode-map [menu-bar mark deletion]
- '("Flag" . archive-flag-deleted))
+ '(menu-item "Flag" archive-flag-deleted
+ :help "Flag file at cursor for deletion"))
(define-key archive-mode-map [menu-bar mark unmark]
- '("Unflag" . archive-unflag))
+ '(menu-item "Unflag" archive-unflag
+ :help "Unmark file at cursor"))
(define-key archive-mode-map [menu-bar mark mark]
- '("Mark" . archive-mark))
+ '(menu-item "Mark" archive-mark
+ :help "Mark file at cursor"))
(define-key archive-mode-map [menu-bar operate]
(cons "Operate" (make-sparse-keymap "Operate")))
(define-key archive-mode-map [menu-bar operate chown]
- '("Change Owner..." . archive-chown-entry))
- (put 'archive-chown-entry 'menu-enable
- '(fboundp (archive-name "chown-entry")))
+ '(menu-item "Change Owner..." archive-chown-entry
+ :enable (fboundp (archive-name "chown-entry"))
+ :help "Change owner of marked files"))
(define-key archive-mode-map [menu-bar operate chgrp]
- '("Change Group..." . archive-chgrp-entry))
- (put 'archive-chgrp-entry 'menu-enable
- '(fboundp (archive-name "chgrp-entry")))
+ '(menu-item "Change Group..." archive-chgrp-entry
+ :enable (fboundp (archive-name "chgrp-entry"))
+ :help "Change group ownership of marked files"))
(define-key archive-mode-map [menu-bar operate chmod]
- '("Change Mode..." . archive-chmod-entry))
- (put 'archive-chmod-entry 'menu-enable
- '(fboundp (archive-name "chmod-entry")))
+ '(menu-item "Change Mode..." archive-chmod-entry
+ :enable (fboundp (archive-name "chmod-entry"))
+ :help "Change mode (permissions) of marked files"))
(define-key archive-mode-map [menu-bar operate rename]
- '("Rename to..." . archive-rename-entry))
- (put 'archive-rename-entry 'menu-enable
- '(fboundp (archive-name "rename-entry")))
+ '(menu-item "Rename to..." archive-rename-entry
+ :enable (fboundp (archive-name "rename-entry"))
+ :help "Rename marked files"))
;;(define-key archive-mode-map [menu-bar operate copy]
- ;; '("Copy to..." . archive-copy))
+ ;; '(menu-item "Copy to..." archive-copy))
(define-key archive-mode-map [menu-bar operate expunge]
- '("Expunge Marked Files" . archive-expunge))
+ '(menu-item "Expunge Marked Files" archive-expunge
+ :help "Delete all flagged files from archive"))
))
(let* ((item1 '(archive-subfile-mode " Archive"))
(let ((coding
(or coding-system-for-read
(and set-auto-coding-function
- (funcall set-auto-coding-function
- (- (point-max) (point-min))))
+ (save-excursion
+ (funcall set-auto-coding-function
+ filename (- (point-max) (point-min)))))
;; dos-w32.el defines find-operation-coding-system for
;; DOS/Windows systems which preserves the coding-system
;; of existing files. We want it to act here as if the
(null
(let (;; We may have to encode file name arguement for
;; external programs.
- (coding-system-for-write file-name-coding-system)
+ (coding-system-for-write
+ (and enable-multibyte-characters
+ file-name-coding-system))
;; We read an archive member by no-conversion at
;; first, then decode appropriately by calling
;; archive-set-buffer-as-visiting-file later.
(if (aref descr 3)
;; Set the file modes, but make sure we can read it.
(set-file-modes tmpfile (logior ?\400 (aref descr 3))))
- (setq ename (encode-coding-string ename file-name-coding-system))
+ (if enable-multibyte-characters
+ (setq ename
+ (encode-coding-string ename file-name-coding-system)))
(let ((exitcode (apply 'call-process
(car command)
nil
(if (fboundp func)
(progn
(funcall func (buffer-file-name)
- (encode-coding-string newname file-name-coding-system)
+ (if enable-multibyte-characters
+ (encode-coding-string newname file-name-coding-system)
+ newname)
descr)
(archive-resummarize))
(error "Renaming is not supported for this archive type"))))
;; Revert the buffer and recompute the dired-like listing.
-(defun archive-mode-revert (&optional no-autosave no-confirm)
+(defun archive-mode-revert (&optional no-auto-save no-confirm)
(let ((no (archive-get-lineno)))
(setq archive-files nil)
(let ((revert-buffer-function nil)
(defun archive-zoo-extract (archive name)
(archive-extract-by-stdout archive name archive-zoo-extract))
;; -------------------------------------------------------------------------
+;; This line was a mistake; it is kept now for compatibility.
+;; rms 15 Oct 98
(provide 'archive-mode)
+(provide 'arc-mode)
+
;; arc-mode.el ends here.