From 2daffe3550ff829396f13dd21d5cb573fede30d9 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 16 Nov 2021 08:18:30 +0100 Subject: Adjust `defvar-keymap' and `define-keymap' to the new syntax * lisp/vc/smerge-mode.el (smerge-basic-map): * lisp/vc/pcvs.el (cvs-mode-map): (cvs-minor-mode-prefix): * lisp/vc/log-view.el (log-view-mode-map): * lisp/vc/log-edit.el (log-edit-mode-map): * lisp/vc/diff-mode.el (diff-mode-shared-map): (diff-minor-mode-prefix): * lisp/vc/cvs-status.el (cvs-status-mode-map): * lisp/simple.el (special-mode-map): * lisp/outline.el (outline--insert-open-button): (outline--insert-close-button): * lisp/net/shr.el (shr-map): * lisp/net/eww.el (eww-link-keymap): (eww-mode-map): (eww-submit-map): (eww-bookmark-mode-map): (eww-history-mode-map): (eww-buffers-mode-map): * lisp/mh-e/mh-speed.el (:keymap): * lisp/mh-e/mh-show.el (:keymap): * lisp/mh-e/mh-search.el (:keymap): * lisp/mh-e/mh-letter.el (:keymap): * lisp/mh-e/mh-folder.el (:keymap): * lisp/international/emoji.el (emoji-list-mode-map): * lisp/gnus/spam.el (:keymap): * lisp/gnus/mml.el (mml-mode-map): * lisp/gnus/message.el (message-mode-map): * lisp/gnus/gnus-undo.el (gnus-undo-mode-map): * lisp/gnus/gnus-topic.el (gnus-topic-mode-map): * lisp/gnus/gnus-sum.el (:keymap): * lisp/gnus/gnus-srvr.el (gnus-server-mode-map): (gnus-browse-mode-map): * lisp/gnus/gnus-salt.el (gnus-pick-mode-map): (gnus-tree-mode-map): * lisp/gnus/gnus-msg.el (:prefix): * lisp/gnus/gnus-ml.el (gnus-mailing-list-mode-map): * lisp/gnus/gnus-kill.el (gnus-kill-file-mode-map): * lisp/gnus/gnus-html.el (gnus-html-displayed-image-map): * lisp/gnus/gnus-group.el (:keymap): * lisp/gnus/gnus-eform.el (gnus-edit-form-mode-map): * lisp/gnus/gnus-draft.el (gnus-draft-mode-map): * lisp/gnus/gnus-dired.el (gnus-dired-mode-map): * lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode-map): * lisp/gnus/gnus-art.el (:keymap): (gnus-article-edit-mode-map): * lisp/gnus/gnus-agent.el (gnus-agent-group-mode-map): (gnus-agent-summary-mode-map): (gnus-agent-server-mode-map): (gnus-category-mode-map): Adjust `defvar-keymap' and `define-keymap' to the new syntax. --- lisp/vc/diff-mode.el | 58 +++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'lisp/vc/diff-mode.el') diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index e68aa2257d2..87d30666da0 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -169,49 +169,49 @@ and hunk-based syntax highlighting otherwise as a fallback." "N" #'diff-file-next "p" #'diff-hunk-prev "P" #'diff-file-prev - ["TAB"] #'diff-hunk-next - [backtab] #'diff-hunk-prev + "TAB" #'diff-hunk-next + "" #'diff-hunk-prev "k" #'diff-hunk-kill "K" #'diff-file-kill "}" #'diff-file-next ; From compilation-minor-mode. "{" #'diff-file-prev - ["RET"] #'diff-goto-source - [mouse-2] #'diff-goto-source + "RET" #'diff-goto-source + "" #'diff-goto-source "W" #'widen "o" #'diff-goto-source ; other-window "A" #'diff-ediff-patch "r" #'diff-restrict-view "R" #'diff-reverse-direction - [remap undo] #'diff-undo) + " " #'diff-undo) (defvar-keymap diff-mode-map :doc "Keymap for `diff-mode'. See also `diff-mode-shared-map'." - ["ESC"] (let ((map (define-keymap :parent diff-mode-shared-map))) - ;; We want to inherit most bindings from - ;; `diff-mode-shared-map', but not all since they may hide - ;; useful `M-' global bindings when editing. - (dolist (key '("A" "r" "R" "g" "q" "W" "z")) - (define-key map key nil)) - map) + "ESC" (let ((map (define-keymap :parent diff-mode-shared-map))) + ;; We want to inherit most bindings from + ;; `diff-mode-shared-map', but not all since they may hide + ;; useful `M-' global bindings when editing. + (dolist (key '("A" "r" "R" "g" "q" "W" "z")) + (keymap-set map key nil)) + map) ;; From compilation-minor-mode. - ["C-c C-c"] #'diff-goto-source + "C-c C-c" #'diff-goto-source ;; By analogy with the global C-x 4 a binding. - ["C-x 4 A"] #'diff-add-change-log-entries-other-window + "C-x 4 A" #'diff-add-change-log-entries-other-window ;; Misc operations. - ["C-c C-a"] #'diff-apply-hunk - ["C-c C-e"] #'diff-ediff-patch - ["C-c C-n"] #'diff-restrict-view - ["C-c C-s"] #'diff-split-hunk - ["C-c C-t"] #'diff-test-hunk - ["C-c C-r"] #'diff-reverse-direction - ["C-c C-u"] #'diff-context->unified + "C-c C-a" #'diff-apply-hunk + "C-c C-e" #'diff-ediff-patch + "C-c C-n" #'diff-restrict-view + "C-c C-s" #'diff-split-hunk + "C-c C-t" #'diff-test-hunk + "C-c C-r" #'diff-reverse-direction + "C-c C-u" #'diff-context->unified ;; `d' because it duplicates the context :-( --Stef - ["C-c C-d"] #'diff-unified->context - ["C-c C-w"] #'diff-ignore-whitespace-hunk + "C-c C-d" #'diff-unified->context + "C-c C-w" #'diff-ignore-whitespace-hunk ;; `l' because it "refreshes" the hunk like C-l refreshes the screen - ["C-c C-l"] #'diff-refresh-hunk - ["C-c C-b"] #'diff-refine-hunk ;No reason for `b' :-( - ["C-c C-f"] #'next-error-follow-minor-mode) + "C-c C-l" #'diff-refresh-hunk + "C-c C-b" #'diff-refine-hunk ;No reason for `b' :-( + "C-c C-f" #'next-error-follow-minor-mode) (easy-menu-define diff-mode-menu diff-mode-map "Menu for `diff-mode'." @@ -264,9 +264,11 @@ and hunk-based syntax highlighting otherwise as a fallback." :help "Go to the next count'th file"] )) -(defcustom diff-minor-mode-prefix "\C-c=" +(defcustom diff-minor-mode-prefix "C-c =" "Prefix key for `diff-minor-mode' commands." - :type '(choice (string "\e") (string "C-c=") string)) + :type '(choice (string "ESC") + (string "C-c =") string) + :version "29.1") (defvar-keymap diff-minor-mode-map :doc "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'." -- cgit v1.2.3