arc-mode.el: Remove XEmacs compat code

* lisp/arc-mode.el (archive-mode-map): Remove XEmacs compat code.
(archive-summarize-files): Ditto.
This commit is contained in:
Lars Ingebrigtsen 2019-05-19 20:37:54 +02:00
parent d4af2f3001
commit 24d30cd61a

View file

@ -417,70 +417,66 @@ file. Archive and member name will be added."
(substitute-key-definition 'advertised-undo 'archive-undo map global-map) (substitute-key-definition 'advertised-undo 'archive-undo map global-map)
(substitute-key-definition 'undo 'archive-undo map global-map)) (substitute-key-definition 'undo 'archive-undo map global-map))
(define-key map (define-key map [mouse-2] 'archive-extract)
(if (featurep 'xemacs) 'button2 [mouse-2]) 'archive-extract)
(if (featurep 'xemacs) (define-key map [menu-bar immediate]
() ; out of luck (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 immediate] (define-key map [menu-bar mark]
(cons "Immediate" (make-sparse-keymap "Immediate"))) (cons "Mark" (make-sparse-keymap "Mark")))
(define-key map [menu-bar immediate alternate] (define-key map [menu-bar mark unmark-all]
'(menu-item "Alternate Display" archive-alternate-display '(menu-item "Unmark All" archive-unmark-all-files
:enable (boundp (archive-name "alternate-display")) :help "Unmark all marked files"))
:help "Toggle alternate file info display")) (define-key map [menu-bar mark deletion]
(define-key map [menu-bar immediate view] '(menu-item "Flag" archive-flag-deleted
'(menu-item "View This File" archive-view :help "Flag file at cursor for deletion"))
:help "Display file at cursor in View Mode")) (define-key map [menu-bar mark unmark]
(define-key map [menu-bar immediate display] '(menu-item "Unflag" archive-unflag
'(menu-item "Display in Other Window" archive-display-other-window :help "Unmark file at cursor"))
:help "Display file at cursor in another window")) (define-key map [menu-bar mark mark]
(define-key map [menu-bar immediate find-file-other-window] '(menu-item "Mark" archive-mark
'(menu-item "Find in Other Window" archive-extract-other-window :help "Mark file at cursor"))
: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] (define-key map [menu-bar operate]
(cons "Mark" (make-sparse-keymap "Mark"))) (cons "Operate" (make-sparse-keymap "Operate")))
(define-key map [menu-bar mark unmark-all] (define-key map [menu-bar operate chown]
'(menu-item "Unmark All" archive-unmark-all-files '(menu-item "Change Owner..." archive-chown-entry
:help "Unmark all marked files")) :enable (fboundp (archive-name "chown-entry"))
(define-key map [menu-bar mark deletion] :help "Change owner of marked files"))
'(menu-item "Flag" archive-flag-deleted (define-key map [menu-bar operate chgrp]
:help "Flag file at cursor for deletion")) '(menu-item "Change Group..." archive-chgrp-entry
(define-key map [menu-bar mark unmark] :enable (fboundp (archive-name "chgrp-entry"))
'(menu-item "Unflag" archive-unflag :help "Change group ownership of marked files"))
:help "Unmark file at cursor")) (define-key map [menu-bar operate chmod]
(define-key map [menu-bar mark mark] '(menu-item "Change Mode..." archive-chmod-entry
'(menu-item "Mark" archive-mark :enable (fboundp (archive-name "chmod-entry"))
:help "Mark file at cursor")) :help "Change mode (permissions) of marked files"))
(define-key map [menu-bar operate rename]
(define-key map [menu-bar operate] '(menu-item "Rename to..." archive-rename-entry
(cons "Operate" (make-sparse-keymap "Operate"))) :enable (fboundp (archive-name "rename-entry"))
(define-key map [menu-bar operate chown] :help "Rename marked files"))
'(menu-item "Change Owner..." archive-chown-entry ;;(define-key map [menu-bar operate copy]
:enable (fboundp (archive-name "chown-entry")) ;; '(menu-item "Copy to..." archive-copy))
:help "Change owner of marked files")) (define-key map [menu-bar operate expunge]
(define-key map [menu-bar operate chgrp] '(menu-item "Expunge Marked Files" archive-expunge
'(menu-item "Change Group..." archive-chgrp-entry :help "Delete all flagged files from archive"))
:enable (fboundp (archive-name "chgrp-entry")) map)
: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.") "Local keymap for archive mode listings.")
(defvar archive-file-name-indent nil "Column where file names start.") (defvar archive-file-name-indent nil "Column where file names start.")
@ -838,13 +834,11 @@ when parsing the archive."
;; Using `concat' here copies the text also, so we can add ;; Using `concat' here copies the text also, so we can add
;; properties without problems. ;; properties without problems.
(let ((text (concat (aref fil 0) "\n"))) (let ((text (concat (aref fil 0) "\n")))
(if (featurep 'xemacs) (add-text-properties
() ; out of luck (aref fil 1) (aref fil 2)
(add-text-properties '(mouse-face highlight
(aref fil 1) (aref fil 2) help-echo "mouse-2: extract this file into a buffer")
'(mouse-face highlight text)
help-echo "mouse-2: extract this file into a buffer")
text))
text)) text))
files))) files)))
(setq archive-file-list-end (point-marker))) (setq archive-file-list-end (point-marker)))