diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-07-15 17:38:05 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-07-15 17:57:27 +0200 |
commit | d8f88748d9445dd521623e0c4bee8659b5b98db0 (patch) | |
tree | 8bd5fe1253968317acae8fca20190e8068d14724 /lisp/tar-mode.el | |
parent | 889943e2bd5668335649b064b10b70a15c17c189 (diff) | |
download | emacs-d8f88748d9445dd521623e0c4bee8659b5b98db0.tar.gz emacs-d8f88748d9445dd521623e0c4bee8659b5b98db0.tar.bz2 emacs-d8f88748d9445dd521623e0c4bee8659b5b98db0.zip |
* lisp/tar-mode.el (tar-mode-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r-- | lisp/tar-mode.el | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index ed48b568423..7b5a869ab57 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -604,44 +604,42 @@ For instance, if mode is #o700, then it produces `rwx------'." (goto-char (point-min)) (restore-buffer-modified-p modified)))) -(defvar tar-mode-map - (let ((map (make-keymap))) - (suppress-keymap map) - (define-key map " " 'tar-next-line) - (define-key map "C" 'tar-copy) - (define-key map "d" 'tar-flag-deleted) - (define-key map "\^D" 'tar-flag-deleted) - (define-key map "e" 'tar-extract) - (define-key map "f" 'tar-extract) - (define-key map "\C-m" 'tar-extract) - (define-key map [mouse-2] 'tar-mouse-extract) - (define-key map "g" 'revert-buffer) - (define-key map "n" 'tar-next-line) - (define-key map "\^N" 'tar-next-line) - (define-key map [down] 'tar-next-line) - (define-key map "o" 'tar-extract-other-window) - (define-key map "p" 'tar-previous-line) - (define-key map "\^P" 'tar-previous-line) - (define-key map [up] 'tar-previous-line) - (define-key map "I" 'tar-new-entry) - (define-key map "R" 'tar-rename-entry) - (define-key map "u" 'tar-unflag) - (define-key map "v" 'tar-view) - (define-key map "w" 'woman-tar-extract-file) - (define-key map "x" 'tar-expunge) - (define-key map "\177" 'tar-unflag-backwards) - (define-key map "E" 'tar-extract-other-window) - (define-key map "M" 'tar-chmod-entry) - (define-key map "G" 'tar-chgrp-entry) - (define-key map "O" 'tar-chown-entry) - ;; Let mouse-1 follow the link. - (define-key map [follow-link] 'mouse-face) - - ;; Get rid of the Edit menu bar item to save space. - (define-key map [menu-bar edit] 'undefined) - - map) - "Local keymap for Tar mode listings.") +(defvar-keymap tar-mode-map + :doc "Local keymap for Tar mode listings." + :full t :suppress t + "SPC" #'tar-next-line + "C" #'tar-copy + "d" #'tar-flag-deleted + "C-d" #'tar-flag-deleted + "e" #'tar-extract + "f" #'tar-extract + "RET" #'tar-extract + "g" #'revert-buffer + "n" #'tar-next-line + "C-n" #'tar-next-line + "<down>" #'tar-next-line + "o" #'tar-extract-other-window + "p" #'tar-previous-line + "C-p" #'tar-previous-line + "<up>" #'tar-previous-line + "I" #'tar-new-entry + "R" #'tar-rename-entry + "u" #'tar-unflag + "v" #'tar-view + "w" #'woman-tar-extract-file + "x" #'tar-expunge + "DEL" #'tar-unflag-backwards + "E" #'tar-extract-other-window + "M" #'tar-chmod-entry + "G" #'tar-chgrp-entry + "O" #'tar-chown-entry + + ;; Let mouse-1 follow the link. + "<follow-link>" 'mouse-face + "<mouse-2>" #'tar-mouse-extract + + ;; Get rid of the Edit menu bar item to save space. + "<menu-bar> <edit>" #'undefined) (easy-menu-define tar-mode-immediate-menu tar-mode-map "Immediate menu for Tar mode." |