+(defvar archive-subtype nil "Symbol describing archive type.")
+(defvar archive-file-list-start nil "Position of first contents line.")
+(defvar archive-file-list-end nil "Position just after last contents line.")
+(defvar archive-proper-file-start nil "Position of real archive's start.")
+(defvar archive-read-only nil "Non-nil if the archive is read-only on disk.")
+(defvar archive-local-name nil "Name of local copy of remote archive.")
+(defvar archive-mode-map
+ (let ((map (make-keymap)))
+ (suppress-keymap map)
+ (define-key map " " 'archive-next-line)
+ (define-key map "a" 'archive-alternate-display)
+ ;;(define-key map "c" 'archive-copy)
+ (define-key map "d" 'archive-flag-deleted)
+ (define-key map "\C-d" 'archive-flag-deleted)
+ (define-key map "e" 'archive-extract)
+ (define-key map "f" 'archive-extract)
+ (define-key map "\C-m" 'archive-extract)
+ (define-key map "g" 'revert-buffer)
+ (define-key map "h" 'describe-mode)
+ (define-key map "m" 'archive-mark)
+ (define-key map "n" 'archive-next-line)
+ (define-key map "\C-n" 'archive-next-line)
+ (define-key map [down] 'archive-next-line)
+ (define-key map "o" 'archive-extract-other-window)
+ (define-key map "p" 'archive-previous-line)
+ (define-key map "q" 'quit-window)
+ (define-key map "\C-p" 'archive-previous-line)
+ (define-key map [up] 'archive-previous-line)
+ (define-key map "r" 'archive-rename-entry)
+ (define-key map "u" 'archive-unflag)
+ (define-key map "\M-\C-?" 'archive-unmark-all-files)
+ (define-key map "v" 'archive-view)
+ (define-key map "x" 'archive-expunge)
+ (define-key map "\177" 'archive-unflag-backwards)
+ (define-key map "E" 'archive-extract-other-window)
+ (define-key map "M" 'archive-chmod-entry)
+ (define-key map "G" 'archive-chgrp-entry)
+ (define-key map "O" 'archive-chown-entry)
+
+ (if (fboundp 'command-remapping)
+ (progn
+ (define-key map [remap advertised-undo] 'archive-undo)
+ (define-key map [remap undo] 'archive-undo))
+ (substitute-key-definition 'advertised-undo 'archive-undo map global-map)
+ (substitute-key-definition 'undo 'archive-undo map global-map))
+
+ (define-key map
+ (if (featurep 'xemacs) 'button2 [mouse-2]) 'archive-extract)
+
+ (if (featurep 'xemacs)
+ () ; out of luck
+
+ (define-key map [menu-bar immediate]
+ (cons "Immediate" (make-sparse-keymap "Immediate")))
+ (define-key map [menu-bar immediate alternate]
+ '(menu-item "Alternate Display" archive-alternate-display
+ :enable (boundp (archive-name "alternate-display"))
+ :help "Toggle alternate file info display"))
+ (define-key map [menu-bar immediate view]
+ '(menu-item "View This File" archive-view
+ :help "Display file at cursor in View Mode"))
+ (define-key map [menu-bar immediate display]
+ '(menu-item "Display in Other Window" archive-display-other-window
+ :help "Display file at cursor in another window"))
+ (define-key map [menu-bar immediate find-file-other-window]
+ '(menu-item "Find in Other Window" archive-extract-other-window
+ :help "Edit file at cursor in another window"))
+ (define-key map [menu-bar immediate find-file]
+ '(menu-item "Find This File" archive-extract
+ :help "Extract file at cursor and edit it"))
+
+ (define-key map [menu-bar mark]
+ (cons "Mark" (make-sparse-keymap "Mark")))
+ (define-key map [menu-bar mark unmark-all]
+ '(menu-item "Unmark All" archive-unmark-all-files
+ :help "Unmark all marked files"))
+ (define-key map [menu-bar mark deletion]
+ '(menu-item "Flag" archive-flag-deleted
+ :help "Flag file at cursor for deletion"))
+ (define-key map [menu-bar mark unmark]
+ '(menu-item "Unflag" archive-unflag
+ :help "Unmark file at cursor"))
+ (define-key map [menu-bar mark mark]
+ '(menu-item "Mark" archive-mark
+ :help "Mark file at cursor"))
+
+ (define-key map [menu-bar operate]
+ (cons "Operate" (make-sparse-keymap "Operate")))
+ (define-key map [menu-bar operate chown]
+ '(menu-item "Change Owner..." archive-chown-entry
+ :enable (fboundp (archive-name "chown-entry"))
+ :help "Change owner of marked files"))
+ (define-key map [menu-bar operate chgrp]
+ '(menu-item "Change Group..." archive-chgrp-entry
+ :enable (fboundp (archive-name "chgrp-entry"))
+ :help "Change group ownership of marked files"))
+ (define-key map [menu-bar operate chmod]
+ '(menu-item "Change Mode..." archive-chmod-entry
+ :enable (fboundp (archive-name "chmod-entry"))
+ :help "Change mode (permissions) of marked files"))
+ (define-key map [menu-bar operate rename]
+ '(menu-item "Rename to..." archive-rename-entry
+ :enable (fboundp (archive-name "rename-entry"))
+ :help "Rename marked files"))
+ ;;(define-key map [menu-bar operate copy]
+ ;; '(menu-item "Copy to..." archive-copy))
+ (define-key map [menu-bar operate expunge]
+ '(menu-item "Expunge Marked Files" archive-expunge
+ :help "Delete all flagged files from archive"))
+ map))
+ "Local keymap for archive mode listings.")
+(defvar archive-file-name-indent nil "Column where file names start.")
+
+(defvar archive-remote nil "Non-nil if the archive is outside file system.")