summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-hooks.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-10 11:53:27 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-10 11:53:27 +0200
commit8b31c18fc8669e3b6e493769c7e033ddea08375c (patch)
tree833bcf16d0571ae467612bfc07e4c20bbbd1a8bd /lisp/vc/vc-hooks.el
parentf002fa8bfc3a217fdce0d54c6b92220d9c8ad6f4 (diff)
downloademacs-8b31c18fc8669e3b6e493769c7e033ddea08375c.tar.gz
Prefer defvar-keymap in vc/*.el
* lisp/vc/add-log.el (change-log-mode-map): * lisp/vc/ediff-mult.el (ediff-dir-diffs-buffer-map): * lisp/vc/vc-annotate.el (vc-annotate-mode-map): * lisp/vc/vc-bzr.el (vc-bzr-shelve-map): * lisp/vc/vc-dir.el (vc-dir-status-mouse-map) (vc-dir-filename-mouse-map): * lisp/vc/vc-git.el (vc-git-stash-shared-map, vc-git-stash-map) (vc-git-stash-button-map, vc-git-log-edit-mode-map): * lisp/vc/vc-hg.el (vc-hg-log-edit-mode-map) (vc-hg-extra-menu-map): * lisp/vc/vc-hooks.el (vc-prefix-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/vc/vc-hooks.el')
-rw-r--r--lisp/vc/vc-hooks.el57
1 files changed, 28 insertions, 29 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 405c9bc2ca4..1f0eeb7e18a 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -855,38 +855,37 @@ In the latter case, VC mode is deactivated for this buffer."
;; Autoloading works fine, but it prevents shortcuts from appearing
;; in the menu because they don't exist yet when the menu is built.
;; (autoload 'vc-prefix-map "vc" nil nil 'keymap)
-(defvar vc-prefix-map
- (let ((map (make-sparse-keymap)))
- (define-key map "a" #'vc-update-change-log)
- (with-suppressed-warnings ((obsolete vc-switch-backend))
- (define-key map "b" #'vc-switch-backend))
- (define-key map "d" #'vc-dir)
- (define-key map "g" #'vc-annotate)
- (define-key map "G" #'vc-ignore)
- (define-key map "h" #'vc-region-history)
- (define-key map "i" #'vc-register)
- (define-key map "l" #'vc-print-log)
- (define-key map "L" #'vc-print-root-log)
- (define-key map "I" #'vc-log-incoming)
- (define-key map "O" #'vc-log-outgoing)
- (define-key map "ML" #'vc-log-mergebase)
- (define-key map "MD" #'vc-diff-mergebase)
- (define-key map "m" #'vc-merge)
- (define-key map "r" #'vc-retrieve-tag)
- (define-key map "s" #'vc-create-tag)
- (define-key map "u" #'vc-revert)
- (define-key map "v" #'vc-next-action)
- (define-key map "+" #'vc-update)
- ;; I'd prefer some kind of symmetry with vc-update:
- (define-key map "P" #'vc-push)
- (define-key map "=" #'vc-diff)
- (define-key map "D" #'vc-root-diff)
- (define-key map "~" #'vc-revision-other-window)
- (define-key map "x" #'vc-delete-file)
- map))
+(defvar-keymap vc-prefix-map
+ "a" #'vc-update-change-log
+ "d" #'vc-dir
+ "g" #'vc-annotate
+ "G" #'vc-ignore
+ "h" #'vc-region-history
+ "i" #'vc-register
+ "l" #'vc-print-log
+ "L" #'vc-print-root-log
+ "I" #'vc-log-incoming
+ "O" #'vc-log-outgoing
+ "M L" #'vc-log-mergebase
+ "M D" #'vc-diff-mergebase
+ "m" #'vc-merge
+ "r" #'vc-retrieve-tag
+ "s" #'vc-create-tag
+ "u" #'vc-revert
+ "v" #'vc-next-action
+ "+" #'vc-update
+ ;; I'd prefer some kind of symmetry with vc-update:
+ "P" #'vc-push
+ "=" #'vc-diff
+ "D" #'vc-root-diff
+ "~" #'vc-revision-other-window
+ "x" #'vc-delete-file)
(fset 'vc-prefix-map vc-prefix-map)
(define-key ctl-x-map "v" 'vc-prefix-map)
+(with-suppressed-warnings ((obsolete vc-switch-backend))
+ (keymap-set vc-prefix-map "b" #'vc-switch-backend))
+
(defvar vc-menu-map
(let ((map (make-sparse-keymap "Version Control")))
;;(define-key map [show-files]